aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorathomas <[email protected]>2003-06-24 20:29:55 +0000
committerathomas <[email protected]>2003-06-24 20:29:55 +0000
commit821fb595bf4123933f2f98a5821a10f2a07432f4 (patch)
tree1ed14632aab6914327799f4298cbe1d7b2e24a10 /src
parent928c9e59205874d1e9f73591514273d6d5608cd4 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/java/net/java/games/joal/ALCImpl.java8
1 files changed, 4 insertions, 4 deletions
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);