Skip to content

Commit

Permalink
Remind developers about memnew() in crash message when missing bind…
Browse files Browse the repository at this point in the history
…ing callbacks
  • Loading branch information
dsnopek committed Jun 27, 2024
1 parent 53b546e commit e65ec90
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/classes/wrapped.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
_constructing_class_binding_callbacks = nullptr;
} else {
ERR_PRINT("BUG: create a Godot Object without binding callbacks.");
CRASH_NOW_MSG("BUG: create a Godot Object without binding callbacks.");
CRASH_NOW_MSG("BUG: Godot Object created without binding callbacks. Did you forget to use memnew()?");
}
}

Expand Down

0 comments on commit e65ec90

Please sign in to comment.