Răsfoiți Sursa

Memory tool: fix null access types (#418)

Tom SPIRA 4 ani în urmă
părinte
comite
d28a856826
1 a modificat fișierele cu 6 adăugiri și 4 ștergeri
  1. 6 4
      other/memory/Memory.hx

+ 6 - 4
other/memory/Memory.hx

@@ -605,10 +605,12 @@ class Memory {
 		for( i in currentTypeIndex...types.length ) {
 			var t = types[i];
 			var tstr = t.toString();
-			resolveCache.set(tstr, t);
-			currentTypeIndex = i + 1;
-			if( tstr == str )
-				return t;
+			if (tstr != null) {
+				resolveCache.set(tstr, t);
+				currentTypeIndex = i + 1;
+				if( tstr == str )
+					return t;
+			}
 		}
 		if( showError )
 			log("Type not found '"+str+"'");