Explorar o código

* Avoid double freeing of frames with zero size as it creates a problem with heaptrc unit

git-svn-id: trunk@17271 -
pierre %!s(int64=14) %!d(string=hai) anos
pai
achega
c22c58b3a5
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      packages/gdbint/src/gdbint.pp

+ 5 - 1
packages/gdbint/src/gdbint.pp

@@ -2773,7 +2773,11 @@ var
 begin
   for i:=0 to frame_size-1 do
    dispose(frames[i],done);
-  freemem(frames,sizeof(pointer)*Frame_size);
+  if assigned(frames) then
+    begin
+      freemem(frames,sizeof(pointer)*Frame_size);
+      frames:=nil;
+    end;
   frame_count:=0;
   frame_size:=0;
 end;