You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-05 17:15:09 +00:00
Fix GDNative compat breakage due to dangling Variants fix
This moves the instance id member from Variant to the ObjectRC so that Variant is still the same size as before the fix (and also regardless if debug or release build).
This commit is contained in:
@@ -1098,7 +1098,7 @@ void Variant::call_ptr(const StringName &p_method, const Variant **p_args, int p
|
||||
Object *obj = _OBJ_PTR(*this);
|
||||
if (!obj) {
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (ScriptDebugger::get_singleton() && _get_obj().instance_id != 0 && !ObjectDB::get_instance(_get_obj().instance_id)) {
|
||||
if (ScriptDebugger::get_singleton() && _get_obj().rc && !ObjectDB::get_instance(_get_obj().rc->instance_id)) {
|
||||
WARN_PRINT("Attempted call on stray pointer object.");
|
||||
}
|
||||
#endif
|
||||
@@ -1275,7 +1275,7 @@ bool Variant::has_method(const StringName &p_method) const {
|
||||
Object *obj = _OBJ_PTR(*this);
|
||||
if (!obj) {
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (ScriptDebugger::get_singleton() && _get_obj().instance_id != 0 && !ObjectDB::get_instance(_get_obj().instance_id)) {
|
||||
if (ScriptDebugger::get_singleton() && _get_obj().rc && !ObjectDB::get_instance(_get_obj().rc->instance_id)) {
|
||||
WARN_PRINT("Attempted method check on stray pointer object.");
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user