Przeglądaj źródła

fixed null proxy

ncannasse 9 lat temu
rodzic
commit
72473cdd70
2 zmienionych plików z 2 dodań i 0 usunięć
  1. 1 0
      hxd/net/ArrayProxy.hx
  2. 1 0
      hxd/net/VectorProxy.hx

+ 1 - 0
hxd/net/ArrayProxy.hx

@@ -126,6 +126,7 @@ abstract ArrayProxy<T>(ArrayProxyData<T>) {
 	}
 	}
 
 
 	@:from static inline function fromArray<T>( a : Array<T> ) {
 	@:from static inline function fromArray<T>( a : Array<T> ) {
+		if( a == null ) return null;
 		return new ArrayProxy(new ArrayProxyData(a));
 		return new ArrayProxy(new ArrayProxyData(a));
 	}
 	}
 }
 }

+ 1 - 0
hxd/net/VectorProxy.hx

@@ -55,6 +55,7 @@ abstract VectorProxy<T>(VectorProxyData<T>) {
 	}
 	}
 
 
 	@:from static inline function fromVector<T>( a : haxe.ds.Vector<T> ) {
 	@:from static inline function fromVector<T>( a : haxe.ds.Vector<T> ) {
+		if( a == null ) return null;
 		return new VectorProxy(new VectorProxyData(a));
 		return new VectorProxy(new VectorProxyData(a));
 	}
 	}
 }
 }