Commits

hr  committed 12f9f59

#i10000#,#i96584#: in case of timeout do not access dead object

  • Participants
  • Parent commits 492caf4
  • Tags DEV300_m36

Comments (0)

Files changed (1)

File vcl/source/helper/threadex.cxx

         osl_resetCondition( m_aStart );
 		osl_resetCondition( m_aFinish );
 		ULONG nSolarMutexCount = Application::ReleaseSolarMutex();
-		Application::PostUserEvent( LINK( this, SolarThreadExecutor, worker ) );
+		ULONG nEvent = Application::PostUserEvent( LINK( this, SolarThreadExecutor, worker ) );
 		if ( osl_cond_result_timeout == osl_waitCondition( m_aStart, _pTimeout ) )
+		{
             m_bTimeout = true;
+			Application::RemoveUserEvent( nEvent );
+		}
         else
             osl_waitCondition( m_aFinish, NULL );
 		if( nSolarMutexCount )