Browse Source

# revisions: 44457,44777

git-svn-id: branches/fixes_3_2@44865 -
marco 5 years ago
parent
commit
b087c236b5
2 changed files with 2 additions and 2 deletions
  1. 1 1
      rtl/objpas/fgl.pp
  2. 1 1
      rtl/win/systhrd.inc

+ 1 - 1
rtl/objpas/fgl.pp

@@ -1732,7 +1732,7 @@ end;
 
 procedure TFPGMapObject.CopyData(Src, Dest: Pointer);
 begin
-  if Assigned(Pointer(Dest^)) then
+  if Assigned(Pointer(Dest^)) And FFreeObjects then
     TData(Dest^).Free;
   TData(Dest^) := TData(Src^);
 end;

+ 1 - 1
rtl/win/systhrd.inc

@@ -548,7 +548,7 @@ begin
   { Try to find TryEnterCriticalSection function }
   KernelHandle:=GetModuleHandle(KernelDLL);
   if KernelHandle<>0 then
-    WinTryEnterCriticalSection:=TTryEnterCriticalSection(GetProcAddress(KernelHandle,'TryEnterCriticalSection'));
+    WinTryEnterCriticalSection:=TTryEnterCriticalSection(WinGetProcAddress(KernelHandle,'TryEnterCriticalSection'));
   if not assigned(WinTryEnterCriticalSection) then
     WinTryEnterCriticalSection:=@Win95TryEnterCriticalSection;
 {$ENDIF SUPPORT_WIN95}