Skip to content

Commit

Permalink
Merge pull request #1510 from dsnopek/memnew-better-crash-message
Browse files Browse the repository at this point in the history
Remind developers about `memnew()` in crash message when missing binding callbacks
  • Loading branch information
dsnopek authored Jul 15, 2024
2 parents 6d939e6 + e65ec90 commit 8012716
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 8012716

Please sign in to comment.