Browse Source

AThreads: In IsValidThreadInfo() leave early if threadinfo is nil

Marcus Sackrow 1 tháng trước cách đây
mục cha
commit
6d6225a4af
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      rtl/amicommon/athreads.pp

+ 1 - 1
rtl/amicommon/athreads.pp

@@ -228,7 +228,7 @@ var
   p: PThreadInfo;
 begin
   IsValidThreadInfo:=false;
-  if l = nil then
+  if (l = nil) or (threadInfo = nil) then
     exit;
 
   ObtainSemaphoreShared(@AThreadListSemaphore);