Explorar o código

* Patch by C Western to fix use of uninitialized lock (bug ID 31682

git-svn-id: trunk@35879 -
michael %!s(int64=8) %!d(string=hai) anos
pai
achega
80c510b4aa
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      packages/fcl-process/src/simpleipc.pp

+ 2 - 1
packages/fcl-process/src/simpleipc.pp

@@ -653,7 +653,8 @@ begin
   try
   try
     MsgItem:=FQueue.Pop;
     MsgItem:=FQueue.Pop;
   finally
   finally
-    LeaveCriticalsection(FLock);
+    if DoLock then
+      LeaveCriticalsection(FLock);
   end;
   end;
   Result:=Assigned(MsgItem);
   Result:=Assigned(MsgItem);
   if Result then
   if Result then