From 821fb595bf4123933f2f98a5821a10f2a07432f4 Mon Sep 17 00:00:00 2001 From: athomas Date: Tue, 24 Jun 2003 20:29:55 +0000 Subject: fixed NPE in ALC.exit() git-svn-id: file:///home/mbien/NetBeansProjects/JOGAMP/joal-sync/git-svn/../svn-server-sync/joal/trunk@29 03bf7f67-59de-4072-a415-9a990d468a3f --- src/java/net/java/games/joal/ALCImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/java/net') diff --git a/src/java/net/java/games/joal/ALCImpl.java b/src/java/net/java/games/joal/ALCImpl.java index ca180ef..05d86bc 100644 --- a/src/java/net/java/games/joal/ALCImpl.java +++ b/src/java/net/java/games/joal/ALCImpl.java @@ -155,13 +155,12 @@ final class ALCImpl implements ALC { public Device alcGetContextsDevice(Context context) { Device result = null; - int devicePtr = getContextDeviceNative(context.pointer); - Device device = new ALC.Device(devicePtr); - + int devicePtr = getContextsDeviceNative(context.pointer); + result = new ALC.Device(devicePtr); return result; } - private native int getContextDeviceNative(int context); + private native int getContextsDeviceNative(int context); private void exit() { @@ -169,6 +168,7 @@ final class ALCImpl implements ALC { if (alcContext != null) { Device alcDevice = alcGetContextsDevice(alcContext); + System.out.println("alcDevice = " + alcDevice); alcMakeContextCurrent(null); alcDestroyContext(alcContext); alcCloseDevice(alcDevice); -- cgit v1.2.3