]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/thread.cpp
wxRTC: fixed guidelines overwriting adjacent cell borders; corrected capitalisation...
[wxWidgets.git] / src / os2 / thread.cpp
index 830595af2a64133b3cc6f5a906d14ed077a23de0..f3277d53326fcff281be6dc599841d82e36156fe 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Original from Wolfram Gloger/Guilhem Lavaux/David Webster
 // Modified by: Stefan Neis
 // Created:     04/22/98
-// RCS-ID:      $Id$
 // Copyright:   (c) Stefan Neis (2003)
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -419,7 +418,7 @@ void wxThreadInternal::OS2ThreadStart( void * pParam )
         unsigned long ulHab;
         if (traits)
             traits->InitializeGui(ulHab);
-        dwRet = (DWORD)pThread->Entry();
+        dwRet = (DWORD)pThread->CallEntry();
         if (traits)
             traits->TerminateGui(ulHab);
 
@@ -626,6 +625,14 @@ wxThreadError wxThread::Run()
 {
     wxCriticalSectionLocker         lock((wxCriticalSection &)m_critsect);
 
+    // Create the thread if it wasn't created yet with an explicit
+    // Create() call:
+    if ( !m_internal->GetHandle() )
+    {
+        if ( !m_internal->Create(this, 0) )
+            return wxTHREAD_NO_RESOURCE;
+    }
+
     if ( m_internal->GetState() != STATE_NEW )
     {
         // actually, it may be almost any state at all, not only STATE_RUNNING