From 4698e13644bbda92439ed26653c9aaa21a45ec42 Mon Sep 17 00:00:00 2001 From: "sha..rd" Date: Sat, 23 Apr 2011 23:05:45 +0000 Subject: [PATCH] * Fixed IllegalArgumentException in Camera.setGuiBounding git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7298 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/renderer/Camera.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/core/com/jme3/renderer/Camera.java b/engine/src/core/com/jme3/renderer/Camera.java index 3dcfcc4c6..ad800a552 100644 --- a/engine/src/core/com/jme3/renderer/Camera.java +++ b/engine/src/core/com/jme3/renderer/Camera.java @@ -1098,8 +1098,8 @@ public class Camera implements Savable, Cloneable { float ex = width * viewPortRight; float sy = height * viewPortBottom; float ey = height * viewPortTop; - float xExtent = (ex - sx) / 2; - float yExtent = (ey - sy) / 2; + float xExtent = Math.max(0f, (ex - sx) / 2f); + float yExtent = Math.max(0f, (ey - sy) / 2f); guiBounding.setCenter(new Vector3f(sx + xExtent, sy + yExtent, 0)); guiBounding.setXExtent(xExtent); guiBounding.setYExtent(yExtent);