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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user