Move increment of EGL state reference count to where new threads
are discovered for simulator version, to balance releaseState in
eglReleaseThread.
--- a/hostsupport/hostegl/src/eglapi.cpp Mon Nov 08 15:40:06 2010 +0000
+++ b/hostsupport/hostegl/src/eglapi.cpp Wed Nov 10 15:26:31 2010 +0000
@@ -78,7 +78,6 @@
g_eglState = NULL;
return NULL;
}
- g_eglState->AddRef();
}
return g_eglState;
#elif defined(_WIN32)
@@ -2493,11 +2492,13 @@
EGLI_ASSERT( process != NULL );
CEGLThread* thread = process->AddThread( threadId, true, state->SupportedApis() );
EGLI_ASSERT( thread != NULL );
+ state->AddRef();
}
else if( !(process->HasThread( threadId )) )
{
CEGLThread* thread = process->AddThread( threadId, true, state->SupportedApis() );
EGLI_ASSERT( thread != NULL );
+ state->AddRef();
}
else
{