From d90cb8e2808e4f1109befaac9512a19629adea53 Mon Sep 17 00:00:00 2001
From: Kenneth Russel <kbrussel@alum.mit.edu>
Date: Tue, 28 Mar 2006 00:56:44 +0000
Subject: Fixed lurking problem associated with on-screen contexts' makeCurrent
 implementations on Windows and OS X where finally block should not cover
 lockSurface call; also fixed problem pointed out by Matt Abraham where if
 WindowsOnscreenGLDrawable.choosePixelFormat() threw an exception it would
 cause subsequent lockSurface() calls to fail

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@689 232f8b59-042b-4e1e-8c03-345bb8c30851
---
 src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java')

diff --git a/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java b/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java
index 3f08b084e..9b60cd77a 100644
--- a/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java
+++ b/src/classes/com/sun/opengl/impl/macosx/MacOSXOnscreenGLContext.java
@@ -54,9 +54,8 @@ public class MacOSXOnscreenGLContext extends MacOSXGLContext {
   }
 
   protected int makeCurrentImpl() throws GLException {
-    int lockRes = 0;
+    int lockRes = drawable.lockSurface();
     try {
-      lockRes = drawable.lockSurface();
       if (lockRes == MacOSXOnscreenGLDrawable.LOCK_SURFACE_NOT_READY) {
         return CONTEXT_NOT_CURRENT;
       }
-- 
cgit v1.2.3