Skip to content

Commit

Permalink
fix: SIGSEGV when GlTextureBuffer is destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
homuler committed Dec 20, 2020
1 parent a10efce commit a1e4cc0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Assets/MediaPipe/SDK/Scripts/Gpu/GpuBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public GpuBuffer(IntPtr ptr, bool isOwner = true) : base(ptr, isOwner) {}

public GpuBuffer(GlTextureBuffer glTextureBuffer) : base() {
UnsafeNativeMethods.mp_GpuBuffer__PSgtb(glTextureBuffer.sharedPtr, out var ptr).Assert();
glTextureBuffer.Dispose(); // GpuBuffer will manage the resource
this.ptr = ptr;
}

Expand Down

0 comments on commit a1e4cc0

Please sign in to comment.