check if LockGL was called, before actually going on with UnlockGL

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28753 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2008-11-30 22:06:25 +00:00
parent 8e9ff38303
commit 5acaa0fe30
+6 -1
View File
@@ -84,7 +84,9 @@ BGLView::LockGL()
{
// TODO: acquire the OpenGL API lock it on this glview
LockLooper();
if (!LockLooper())
return;
fDisplayLock.Lock();
if (fRenderer)
fRenderer->LockGL();
}
@@ -93,6 +95,9 @@ BGLView::LockGL()
void
BGLView::UnlockGL()
{
if (!fDisplayLock.IsLocked())
return;
fDisplayLock.Unlock();
if (fRenderer)
fRenderer->UnlockGL();
UnlockLooper();