فهرست منبع

added some explicit null checks (match flash impl + we null check anyway)

Nicolas Cannasse 9 سال پیش
والد
کامیت
555cdebe23
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      std/hl/_std/haxe/ds/StringMap.hx

+ 3 - 0
std/hl/_std/haxe/ds/StringMap.hx

@@ -58,14 +58,17 @@ class StringMap<T> implements haxe.Constraints.IMap<String,T> {
 	}
 
 	public function get( key : String ) : Null<T> {
+		if( key == null ) return null;
 		return @:privateAccess h.get(key.bytes);
 	}
 
 	public function exists( key : String ) : Bool {
+		if( key == null ) return false;
 		return @:privateAccess h.exists(key.bytes);
 	}
 
 	public function remove( key : String ) : Bool {
+		if( key == null ) return false;
 		return @:privateAccess h.remove(key.bytes);
 	}