Browse Source

Add == check

Ryan McDonough 5 months ago
parent
commit
03191616f4
1 changed files with 4 additions and 1 deletions
  1. 4 1
      jme3-core/src/main/java/com/jme3/texture/TextureArray.java

+ 4 - 1
jme3-core/src/main/java/com/jme3/texture/TextureArray.java

@@ -175,6 +175,9 @@ public class TextureArray extends Texture {
 
     @Override
     public boolean equals(Object other) {
+        if (this == obj) {
+            return true; 
+        }
         if (!(other instanceof TextureArray)) {
             return false;
         }
@@ -193,4 +196,4 @@ public class TextureArray extends Texture {
         hash = 79 * hash + (this.wrapT != null ? this.wrapT.hashCode() : 0);
         return hash;
     }
-}
+}