Skip to content

Commit

Permalink
C#: Fix issues for StringName reference in CSharpInstanceBridge.Get.
Browse files Browse the repository at this point in the history
  • Loading branch information
zaevi committed Jan 28, 2024
1 parent 17e7f85 commit 1e14503
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ internal static unsafe godot_bool Get(IntPtr godotObjectGCHandle, godot_string_n
// Signals
if (godotObject.HasGodotClassSignal(CustomUnsafe.AsRef(name)))
{
godot_signal signal = new godot_signal(*name, godotObject.GetInstanceId());
godot_signal signal = new godot_signal(NativeFuncs.godotsharp_string_name_new_copy(*name), godotObject.GetInstanceId());
*outRet = VariantUtils.CreateFromSignalTakingOwnershipOfDisposableValue(signal);
return godot_bool.True;
}

// Methods
if (godotObject.HasGodotClassMethod(CustomUnsafe.AsRef(name)))
{
godot_callable method = new godot_callable(*name, godotObject.GetInstanceId());
godot_callable method = new godot_callable(NativeFuncs.godotsharp_string_name_new_copy(*name), godotObject.GetInstanceId());
*outRet = VariantUtils.CreateFromCallableTakingOwnershipOfDisposableValue(method);
return godot_bool.True;
}
Expand Down

0 comments on commit 1e14503

Please sign in to comment.