diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/classes/share/javax/media/j3d/Appearance.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/classes/share/javax/media/j3d/Appearance.java b/src/classes/share/javax/media/j3d/Appearance.java index f7e1eff..957f66e 100644 --- a/src/classes/share/javax/media/j3d/Appearance.java +++ b/src/classes/share/javax/media/j3d/Appearance.java @@ -704,13 +704,15 @@ public class Appearance extends NodeComponent { // Do illegal sharing check if (stateArray != null) { for(int j=0; j<stateArray.length; j++) { - TextureRetained texRetained = - ((TextureUnitStateRetained)stateArray[j].retained).texture; - if(texRetained != null) { - ImageComponent[] images = texRetained.getImages(); - if(images != null) { - for(int i=0; i<images.length; i++) { - validateImageIllegalSharing(images[i]); + if(stateArray[j] != null) { + TextureRetained texRetained = + ((TextureUnitStateRetained)stateArray[j].retained).texture; + if(texRetained != null) { + ImageComponent[] images = texRetained.getImages(); + if(images != null) { + for(int i=0; i<images.length; i++) { + validateImageIllegalSharing(images[i]); + } } } } |