summarylogtreecommitdiffstats
path: root/libecwj2-3.3-3245a.patch
blob: c5272629ffc323ae7264af8829671ddd07b58b78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- ./Source/C/NCSUtil/NCSThread.cpp.orig	2010-10-29 16:17:21.000000000 +0100
+++ ./Source/C/NCSUtil/NCSThread.cpp	2010-10-29 16:20:15.000000000 +0100
@@ -47,6 +47,12 @@
 	//void **pStartData = (void **)NCSMalloc(2 * sizeof(void*), TRUE);
 	//pStartData[0] = (void*)this;
 	//pStartData[1] = pData;
+	if( m_Thread != NCS_NULL_THREAD_ID )
+	{
+	    //fprintf( stderr, "Cleanup old threadinfo in spawn()\n" );
+	    FreeInfo();
+	    m_Thread = NCS_NULL_THREAD_ID;
+	}
 	m_pData = pData;
 	m_bRun = true;
 	return(NCSThreadSpawn(&m_Thread, CNCSThread::ThreadFunc, (void*)this, bCreateSuspended)==TRUE);