diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-12-06 20:41:56 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-12-06 20:41:56 +0100 |
| commit | ee0a7dccc1eec0538d11bc67db9adba94b4aef21 (patch) | |
| tree | 6e6695667c5f76622fd825270399413caa3a44cd /vulkan/Utf8StringPointer.cs | |
| parent | e31487324a18a58908ebe7b7e0acfb3c8b4ac144 (diff) | |
struct size ok
Diffstat (limited to 'vulkan/Utf8StringPointer.cs')
| -rw-r--r-- | vulkan/Utf8StringPointer.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vulkan/Utf8StringPointer.cs b/vulkan/Utf8StringPointer.cs index 943fe75..e75fd64 100644 --- a/vulkan/Utf8StringPointer.cs +++ b/vulkan/Utf8StringPointer.cs @@ -27,7 +27,10 @@ namespace Vulkan => handle == IntPtr.Zero ? "" : System.Runtime.InteropServices.Marshal.PtrToStringUTF8 (handle); public void Dispose() { - handle.Unpin(); + if (handle != IntPtr.Zero) { + handle.Unpin(); + handle = IntPtr.Zero; + } } } }
\ No newline at end of file |