gstreamer: Remove bad asserts in two impl FromValueOptional

These prevented actually getting a None out of a Value which contains a
NULL.
This commit is contained in:
Jan Alexander Steffens (heftig) 2019-09-24 11:32:58 +02:00 committed by Sebastian Dröge
parent eaacee49de
commit dca2cc1c5d
2 changed files with 0 additions and 2 deletions

View file

@ -250,7 +250,6 @@ impl FromGlibPtrFull<*mut gst_sys::GstCapsFeatures> for CapsFeatures {
impl<'a> glib::value::FromValueOptional<'a> for CapsFeatures {
unsafe fn from_value_optional(v: &'a glib::Value) -> Option<Self> {
let ptr = gobject_sys::g_value_get_boxed(v.to_glib_none().0);
assert!(!ptr.is_null());
from_glib_none(ptr as *const gst_sys::GstCapsFeatures)
}
}

View file

@ -320,7 +320,6 @@ impl FromGlibPtrFull<*mut gst_sys::GstStructure> for Structure {
impl<'a> glib::value::FromValueOptional<'a> for Structure {
unsafe fn from_value_optional(v: &'a glib::Value) -> Option<Self> {
let ptr = gobject_sys::g_value_get_boxed(v.to_glib_none().0);
assert!(!ptr.is_null());
from_glib_none(ptr as *const gst_sys::GstStructure)
}
}