Skip to content

Commit

Permalink
Another fix, but not the variant description fix
Browse files Browse the repository at this point in the history
  • Loading branch information
migueldeicaza committed May 21, 2023
1 parent 20859a7 commit 64f95f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/SwiftGodot/Core/ClassServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,13 @@ func bind_call (_ udata: UnsafeMutableRawPointer?,
}
let retContent = returnValue.assumingMemoryBound(to: Variant.ContentType.self)
retContent.pointee = ret.content

// Since we are giving control to Godot of this variant, we need to make sure that
// the destructor does not get invoked here.
//
// Another instance of the problem fixed here:
// 5deb4affbc9cbaa7ca86066cac4a9d87f33e60e6
ret.content = Variant.zero
}
}

Expand Down

0 comments on commit 64f95f2

Please sign in to comment.