From deae399075e836248e343793e693c00ae43f6872 Mon Sep 17 00:00:00 2001 From: "sha..rd" Date: Sat, 7 May 2011 20:07:42 +0000 Subject: [PATCH] * Fixed exception in Mesh.setInterleaved git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7464 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/scene/VertexBuffer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/core/com/jme3/scene/VertexBuffer.java b/engine/src/core/com/jme3/scene/VertexBuffer.java index 341edf0b7..7526708d5 100644 --- a/engine/src/core/com/jme3/scene/VertexBuffer.java +++ b/engine/src/core/com/jme3/scene/VertexBuffer.java @@ -423,10 +423,11 @@ public class VertexBuffer extends GLObject implements Savable, Cloneable { } // will force renderer to call glBufferData again - if (this.data.getClass() != data.getClass() || data.limit() != lastLimit){ + if (data != null && (this.data.getClass() != data.getClass() || data.limit() != lastLimit)){ dataSizeChanged = true; lastLimit = data.limit(); } + this.data = data; setUpdateNeeded(); }