瀏覽代碼

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

David Snopek 1 年之前
父節點
當前提交
e65ec904b8
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/classes/wrapped.cpp

+ 1 - 2
src/classes/wrapped.cpp

@@ -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()?");
 	}
 }