diff --git a/engine/src/core/com/jme3/texture/FrameBuffer.java b/engine/src/core/com/jme3/texture/FrameBuffer.java index c09ec76df..c34879400 100644 --- a/engine/src/core/com/jme3/texture/FrameBuffer.java +++ b/engine/src/core/com/jme3/texture/FrameBuffer.java @@ -284,9 +284,9 @@ public class FrameBuffer extends NativeObject { */ public void setTargetIndex(int index){ if (index < 0 || index >= 16) - throw new IllegalArgumentException(); + throw new IllegalArgumentException("Target index must be between 0 and 16"); - if (colorBufs.size() >= index) + if (colorBufs.size() < index) throw new IllegalArgumentException("The target at " + index + " is not set!"); colorBufIndex = index;