Skip to content

Commit 81d5ca6

Browse files
committed
GLRenderer: avoid NPE reported by Pavl_G (#1527)
1 parent e5899ff commit 81d5ca6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -2852,7 +2852,8 @@ public void clearVertexAttribs() {
28522852
for (int i = 0; i < attribList.oldLen; i++) {
28532853
int idx = attribList.oldList[i];
28542854
gl.glDisableVertexAttribArray(idx);
2855-
if (context.boundAttribs[idx].get().isInstanced()) {
2855+
VertexBuffer buffer = context.boundAttribs[idx].get();
2856+
if (buffer != null && buffer.isInstanced()) {
28562857
glext.glVertexAttribDivisorARB(idx, 0);
28572858
}
28582859
context.boundAttribs[idx] = null;

0 commit comments

Comments
 (0)