* Prevent constant exception in FrameBuffer.setTargetIndex()

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9034 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..om 13 years ago
parent 1aabed9bc5
commit fc5c7d06d2
  1. 4
      engine/src/core/com/jme3/texture/FrameBuffer.java

@ -284,9 +284,9 @@ public class FrameBuffer extends NativeObject {
*/ */
public void setTargetIndex(int index){ public void setTargetIndex(int index){
if (index < 0 || index >= 16) 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!"); throw new IllegalArgumentException("The target at " + index + " is not set!");
colorBufIndex = index; colorBufIndex = index;

Loading…
Cancel
Save