diff --git a/engine/src/core/com/jme3/material/MatParam.java b/engine/src/core/com/jme3/material/MatParam.java index 8dd89a19b..7129c5486 100644 --- a/engine/src/core/com/jme3/material/MatParam.java +++ b/engine/src/core/com/jme3/material/MatParam.java @@ -223,7 +223,7 @@ public class MatParam implements Savable, Cloneable { @Override public String toString(){ - return type.name()+" "+name; + return type.name() + " " + name + " : " + getValueAsString(); } public void apply(Renderer r, Technique technique) { diff --git a/engine/src/niftygui/com/jme3/niftygui/RenderImageJme.java b/engine/src/niftygui/com/jme3/niftygui/RenderImageJme.java index 5a9eb47d8..8faf32430 100644 --- a/engine/src/niftygui/com/jme3/niftygui/RenderImageJme.java +++ b/engine/src/niftygui/com/jme3/niftygui/RenderImageJme.java @@ -63,10 +63,13 @@ public class RenderImageJme implements RenderImage { } public RenderImageJme(Texture2D texture){ + if (texture.getImage() == null) + throw new IllegalArgumentException("texture.getImage() cannot be null"); + this.texture = texture; this.image = texture.getImage(); - if (this.image == null) - throw new NullPointerException("texture.getImage() cannot be null"); + width = image.getWidth(); + height = image.getHeight(); } public Texture2D getTexture(){