diff options
Diffstat (limited to 'src/VBox/Additions/common/crOpenGL/context.c')
-rw-r--r-- | src/VBox/Additions/common/crOpenGL/context.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/VBox/Additions/common/crOpenGL/context.c b/src/VBox/Additions/common/crOpenGL/context.c index 1bb3afc92..f77ea413d 100644 --- a/src/VBox/Additions/common/crOpenGL/context.c +++ b/src/VBox/Additions/common/crOpenGL/context.c @@ -496,8 +496,8 @@ InstantiateNativeContext( WindowInfo *window, ContextInfo *context ) #ifdef WINDOWS void -stubGetWindowGeometry( const WindowInfo *window, int *x, int *y, - unsigned int *w, unsigned int *h ) +stubGetWindowGeometry(const WindowInfo *window, int *x, int *y, + unsigned int *w, unsigned int *h ) { RECT rect; @@ -1132,6 +1132,9 @@ stubDestroyContext( unsigned long contextId ) if (!stub.contextTable) { return; } + + crHashtableLock(stub.contextTable); + context = (ContextInfo *) crHashtableSearch(stub.contextTable, contextId); CRASSERT(context); @@ -1166,8 +1169,9 @@ stubDestroyContext( unsigned long contextId ) crMemZero(context, sizeof(ContextInfo)); /* just to be safe */ crHashtableDelete(stub.contextTable, contextId, crFree); -} + crHashtableUnlock(stub.contextTable); +} void stubSwapBuffers(WindowInfo *window, GLint flags) |