HaxeObject.create returns null when handle is null

This commit is contained in:
melonin
2019-03-15 14:21:02 +07:00
committed by Joshua Granick
parent a5de7d83c2
commit 6c01e873af

View File

@@ -19,7 +19,12 @@ public class HaxeObject
__haxeHandle = value;
}
public static HaxeObject create(long inHandle) { return new HaxeObject(inHandle); }
public static HaxeObject create(long inHandle)
{
if (inHandle == 0)
return null;
return new HaxeObject(inHandle);
}
protected void finalize() throws Throwable {