&& keyframes[currentFrame].getTextures() != null && keyframes[nextFrame].getTextures() != null) {
&& keyframes[currentFrame].getTextures().length > 0 && keyframes[nextFrame].getTextures().length > 0) {
	public void update(float time) {		//determine repeat type. This defines how the current time		//and keyframes are loaded.		if (getRepeatType() == Controller.RT_CLAMP) {			currentTime += time;			if (currentTime >= 1) {				currentFrame++;				nextFrame++;				if (currentFrame >= maxFrame) {					currentFrame = maxFrame;				}				if (nextFrame >= maxFrame) {					nextFrame = maxFrame;				}				currentTime = 0;			}		} else if (getRepeatType() == Controller.RT_WRAP) {			currentTime += time;			if (currentTime >= 1) {				currentFrame++;				nextFrame++;				if (currentFrame >= maxFrame) {					currentFrame = minFrame;				}				if (nextFrame >= maxFrame) {					nextFrame = minFrame;				}				currentTime = 0;			}		} else if (getRepeatType() == Controller.RT_CYCLE) {			currentTime += time;			if (currentTime >= 1) {				currentFrame += cycleModifier;				nextFrame += cycleModifier;				if (currentFrame >= maxFrame) {					currentFrame = maxFrame;					cycleModifier = -1;				} else if (currentFrame <= minFrame) {					currentFrame = minFrame;					cycleModifier = 1;				}				if (nextFrame >= maxFrame) {					nextFrame = maxFrame - 2;					cycleModifier = -1;				} else if (currentFrame <= minFrame) {					nextFrame = minFrame + 1;					cycleModifier = 1;				}				currentTime = 0;			}		}		//Morph each aspect of the model for every vertex.		for (int i = 0; i < displayedMesh.getVertices().length; i++) {			//morph vertices			if (displayedMesh.getVertices() != null				&& keyframes[currentFrame].getVertices() != null				&& keyframes[nextFrame].getVertices() != null) {				Vector3f[] verts = displayedMesh.getVertices();				verts[i].x =					keyframes[currentFrame].getVertices()[i].x						+ currentTime							* (keyframes[nextFrame].getVertices()[i].x								- keyframes[currentFrame].getVertices()[i].x);				verts[i].y =					keyframes[currentFrame].getVertices()[i].y						+ currentTime							* (keyframes[nextFrame].getVertices()[i].y								- keyframes[currentFrame].getVertices()[i].y);				verts[i].z =					keyframes[currentFrame].getVertices()[i].z						+ currentTime							* (keyframes[nextFrame].getVertices()[i].z								- keyframes[currentFrame].getVertices()[i].z);				displayedMesh.updateVertexBuffer();			}			//morph normals if appropriate			if (displayedMesh.getNormals() != null				&& keyframes[currentFrame].getNormals() != null				&& keyframes[nextFrame].getNormals() != null) {				Vector3f[] norms = displayedMesh.getNormals();				norms[i].x =					keyframes[currentFrame].getNormals()[i].x						+ currentTime							* (keyframes[nextFrame].getNormals()[i].x								- keyframes[currentFrame].getNormals()[i].x);				norms[i].y =					keyframes[currentFrame].getNormals()[i].y						+ currentTime							* (keyframes[nextFrame].getNormals()[i].y								- keyframes[currentFrame].getNormals()[i].y);				norms[i].z =					keyframes[currentFrame].getNormals()[i].z						+ currentTime							* (keyframes[nextFrame].getNormals()[i].z								- keyframes[currentFrame].getNormals()[i].z);				displayedMesh.updateNormalBuffer();			}			//morph texture coordinates if appropriate.			if (displayedMesh.getTextures() != null				&& keyframes[currentFrame].getTextures() != null				&& keyframes[nextFrame].getTextures() != null) {				Vector2f[] texs = displayedMesh.getTextures();				texs[i].x =					keyframes[currentFrame].getTextures()[i].x						+ currentTime							* (keyframes[nextFrame].getTextures()[i].x								- keyframes[currentFrame].getTextures()[i].x);				texs[i].y =					keyframes[currentFrame].getTextures()[i].y						+ currentTime							* (keyframes[nextFrame].getTextures()[i].y								- keyframes[currentFrame].getTextures()[i].y);				displayedMesh.updateTextureBuffer();			}			//morph colors if appropriate.			if (displayedMesh.getColors() != null				&& keyframes[currentFrame].getColors() != null				&& keyframes[nextFrame].getColors() != null) {				ColorRGBA[] colors = displayedMesh.getColors();				colors[i].r =					keyframes[currentFrame].getColors()[i].r						+ currentTime							* (keyframes[nextFrame].getColors()[i].r								- keyframes[currentFrame].getColors()[i].r);				colors[i].g =					keyframes[currentFrame].getColors()[i].g						+ currentTime							* (keyframes[nextFrame].getColors()[i].g								- keyframes[currentFrame].getColors()[i].g);				colors[i].b =					keyframes[currentFrame].getColors()[i].b						+ currentTime							* (keyframes[nextFrame].getColors()[i].b								- keyframes[currentFrame].getColors()[i].b);				colors[i].a =					keyframes[currentFrame].getColors()[i].a						+ currentTime							* (keyframes[nextFrame].getColors()[i].a								- keyframes[currentFrame].getColors()[i].a);				displayedMesh.updateColorBuffer();			}		}	}