bin: Use from_glib_none() in Bin::add() for subclasses

This way we take ownership of any floating references passed in here, as
required by the GstBin API, instead of just borrowing the reference and
having someone else sink it or not.
This commit is contained in:
Sebastian Dröge 2019-12-04 18:49:12 +02:00
parent ead607ab8e
commit 84ac2ef073

View file

@ -116,7 +116,7 @@ where
let wrap: Bin = from_glib_borrow(ptr);
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
match imp.add_element(&wrap, &from_glib_borrow(element)) {
match imp.add_element(&wrap, &from_glib_none(element)) {
Ok(()) => true,
Err(err) => {
err.log_with_object(&wrap);