From aa789b25e9a0a592de0a69861e9ffea26edb7adf Mon Sep 17 00:00:00 2001 From: Wade Walker Date: Sat, 26 Mar 2011 13:31:48 -0500 Subject: Fix NPE caused by refactoring on 2/26/2011. The refactoring refers to the static sunToolkitClass when it's not initialized, which causes an NPE and makes the system think it can't do AWT locks. --- src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nativewindow/classes/jogamp') diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java index 80dd5c402..044f02dca 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java @@ -102,9 +102,9 @@ public class JAWTUtil { PrivilegedDataBlob1 d = new PrivilegedDataBlob1(); try { d.sunToolkitClass = Class.forName("sun.awt.SunToolkit"); - d.sunToolkitAWTLockMethod = sunToolkitClass.getDeclaredMethod("awtLock", new Class[]{}); + d.sunToolkitAWTLockMethod = d.sunToolkitClass.getDeclaredMethod("awtLock", new Class[]{}); d.sunToolkitAWTLockMethod.setAccessible(true); - d.sunToolkitAWTUnlockMethod = sunToolkitClass.getDeclaredMethod("awtUnlock", new Class[]{}); + d.sunToolkitAWTUnlockMethod = d.sunToolkitClass.getDeclaredMethod("awtUnlock", new Class[]{}); d.sunToolkitAWTUnlockMethod.setAccessible(true); d.ok=true; } catch (Exception e) { -- cgit v1.2.3