mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
Add check for null before calling Structure.FreeNative
This commit is contained in:
parent
61523d6d5a
commit
d957255ae1
3 changed files with 6 additions and 3 deletions
|
@ -86,6 +86,7 @@ public Gst.Structure Structure {
|
|||
|
||||
IntPtr raw_ret = gst_event_get_structure (Handle);
|
||||
Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true);
|
||||
if (ret != null)
|
||||
ret.FreeNative = false;
|
||||
cached_structure = ret;
|
||||
return ret;
|
||||
|
|
|
@ -86,6 +86,7 @@ public Gst.Structure Structure {
|
|||
|
||||
IntPtr raw_ret = gst_message_get_structure (Handle);
|
||||
Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true);
|
||||
if (ret != null)
|
||||
ret.FreeNative = false;
|
||||
cached_structure = ret;
|
||||
return ret;
|
||||
|
|
|
@ -12,6 +12,7 @@ public Gst.Structure Structure {
|
|||
|
||||
IntPtr raw_ret = gst_query_get_structure (Handle);
|
||||
Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), true);
|
||||
if (ret != null)
|
||||
ret.FreeNative = false;
|
||||
cached_structure = ret;
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue