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,7 +86,8 @@ 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);
|
||||
ret.FreeNative = false;
|
||||
if (ret != null)
|
||||
ret.FreeNative = false;
|
||||
cached_structure = ret;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,8 @@ 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);
|
||||
ret.FreeNative = false;
|
||||
if (ret != null)
|
||||
ret.FreeNative = false;
|
||||
cached_structure = ret;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,8 @@ 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);
|
||||
ret.FreeNative = false;
|
||||
if (ret != null)
|
||||
ret.FreeNative = false;
|
||||
cached_structure = ret;
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue