diff --git a/engine/src/lwjgl-oal/com/jme3/audio/lwjgl/LwjglAudioRenderer.java b/engine/src/lwjgl-oal/com/jme3/audio/lwjgl/LwjglAudioRenderer.java index 1a4e1b5e8..8922a149a 100644 --- a/engine/src/lwjgl-oal/com/jme3/audio/lwjgl/LwjglAudioRenderer.java +++ b/engine/src/lwjgl-oal/com/jme3/audio/lwjgl/LwjglAudioRenderer.java @@ -623,7 +623,8 @@ public class LwjglAudioRenderer implements AudioRenderer, Runnable { boolean active = true; int processed = alGetSourcei(sourceId, AL_BUFFERS_PROCESSED); - while((processed--) != 0){ +// while((processed--) != 0){ + if (processed > 0){ int buffer; ib.position(0).limit(1); diff --git a/engine/src/lwjgl-ogl/com/jme3/renderer/lwjgl/LwjglRenderer.java b/engine/src/lwjgl-ogl/com/jme3/renderer/lwjgl/LwjglRenderer.java index 8dd2e9587..53509c11b 100644 --- a/engine/src/lwjgl-ogl/com/jme3/renderer/lwjgl/LwjglRenderer.java +++ b/engine/src/lwjgl-ogl/com/jme3/renderer/lwjgl/LwjglRenderer.java @@ -993,12 +993,13 @@ public class LwjglRenderer implements Renderer { public void setShader(Shader shader) { if (shader == null) { - if (context.boundShaderProgram > 0) { - glUseProgram(0); - statistics.onShaderUse(null, true); - context.boundShaderProgram = 0; - boundShader = null; - } + throw new IllegalArgumentException("shader cannot be null"); +// if (context.boundShaderProgram > 0) { +// glUseProgram(0); +// statistics.onShaderUse(null, true); +// context.boundShaderProgram = 0; +// boundShader = null; +// } } else { if (shader.isUpdateNeeded()) { updateShaderData(shader);