LockMutext(GraphicsLock) before SetContext()

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3397 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
Meep-Eep
2009-12-07 21:42:59 +00:00
parent d93037c045
commit 9940281f1a
+6 -1
View File
@@ -1920,11 +1920,14 @@ debugContexts (void)
return;
inDebugContexts = true;
LockMutex (GraphicsLock);
contextCount = countVisibleContexts ();
if (contextCount == 0)
{
UnlockMutex (GraphicsLock);
goto out;
}
LockMutex (GraphicsLock);
savedScreen = getScreen ();
//UnlockMutex (GraphicsLock);
FlushGraphics ();
@@ -1974,7 +1977,9 @@ debugContexts (void)
DoInput(&state, TRUE);
}
LockMutex (GraphicsLock);
SetContext (orgContext);
UnlockMutex (GraphicsLock);
// Destroy the debugging frame and context.
DestroyContext (debugDrawContext);