Remind developers about `memnew()` in crash message when missing binding callbacks

pull/1510/head
David Snopek 2024-06-27 13:09:24 -05:00
parent 53b546e1df
commit e65ec904b8
1 changed files with 1 additions and 2 deletions

View File

@ -84,8 +84,7 @@ Wrapped::Wrapped(const StringName p_godot_class) {
godot::internal::gdextension_interface_object_set_instance_binding(_owner, godot::internal::token, this, _constructing_class_binding_callbacks); godot::internal::gdextension_interface_object_set_instance_binding(_owner, godot::internal::token, this, _constructing_class_binding_callbacks);
_constructing_class_binding_callbacks = nullptr; _constructing_class_binding_callbacks = nullptr;
} else { } else {
ERR_PRINT("BUG: create a Godot Object without binding callbacks."); CRASH_NOW_MSG("BUG: Godot Object created without binding callbacks. Did you forget to use memnew()?");
CRASH_NOW_MSG("BUG: create a Godot Object without binding callbacks.");
} }
} }