Ver Fonte

* No change when clearing empty collection

git-svn-id: trunk@20780 -
michael há 13 anos atrás
pai
commit
1eca76dec5
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      rtl/objpas/classes/collect.inc

+ 2 - 0
rtl/objpas/classes/collect.inc

@@ -343,6 +343,8 @@ end;
 
 procedure TCollection.Clear;
 begin
+  if (FItems=Nil) or (FItems.Count=0) then
+    exit; // Prevent Changed
   BeginUpdate;
   try
     DoClear;