From fc5c7d06d2c48908daf2c7126bb5042c1fe8ec02 Mon Sep 17 00:00:00 2001 From: "Sha..om" Date: Sat, 14 Jan 2012 23:45:10 +0000 Subject: [PATCH] * Prevent constant exception in FrameBuffer.setTargetIndex() git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9034 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/texture/FrameBuffer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;