Fixed material contentEquals crash when technique is null.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9458 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
rem..om 2012-06-07 21:59:31 +00:00
parent 476120616c
commit 3e35e32b2d

View File

@ -252,8 +252,8 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
// E.g. if user chose custom technique for one material but // E.g. if user chose custom technique for one material but
// uses default technique for other material, the materials // uses default technique for other material, the materials
// are not equal. // are not equal.
String thisDefName = this.technique != null ? this.technique.getDef().getName() : null; String thisDefName = this.technique != null ? this.technique.getDef().getName() : "";
String otherDefName = other.technique != null ? other.technique.getDef().getName() : null; String otherDefName = other.technique != null ? other.technique.getDef().getName() : "";
if (!thisDefName.equals(otherDefName)) { if (!thisDefName.equals(otherDefName)) {
return false; return false;
} }