# HG changeset patch # User Matt Plumtree # Date 1289402791 0 # Node ID 82d8da1d79c75f787cffc7ccaf13228365d5f616 # Parent 4ba73111e824b6724c101b4982b5ea7160d80a5b Move increment of EGL state reference count to where new threads are discovered for simulator version, to balance releaseState in eglReleaseThread. diff -r 4ba73111e824 -r 82d8da1d79c7 hostsupport/hostegl/src/eglapi.cpp --- 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 {