aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/share
diff options
context:
space:
mode:
authorChien Yang <[email protected]>2006-11-09 22:46:37 +0000
committerChien Yang <[email protected]>2006-11-09 22:46:37 +0000
commitdb05ec665e7ead1675e0c22f2cdec5fb47c9fe58 (patch)
tree8368173ffd1b9974aa85d559ed4335baf27ce8c9 /src/classes/share
parent692f8844f3632f162e7d983ab8fc156fe6222ced (diff)
Fixed Issue 380 : NPE when uncheck Show Color Texture in Dot3 demo
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@746 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/classes/share')
-rw-r--r--src/classes/share/javax/media/j3d/Appearance.java16
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]);
+ }
}
}
}