Browse Source

* thread creation failure for win<x>. Mantis 13798

git-svn-id: trunk@13188 -
marco 16 years ago
parent
commit
82b9749e71
1 changed files with 3 additions and 0 deletions
  1. 3 0
      rtl/win/tthread.inc

+ 3 - 0
rtl/win/tthread.inc

@@ -20,6 +20,9 @@ begin
   if CreateSuspended then Flags := CREATE_SUSPENDED;
   FHandle := BeginThread(nil, StackSize, @ThreadProc, pointer(self), Flags,
                          FThreadID);
+  if FHandle = TThreadID(0) then
+    raise EThread.create('Failed to create new thread, code:'+inttostr(getlasterror));
+  
   FFatalException := nil;
 end;