mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 13:01:07 +00:00
gtk4: Use a correctly typed None value when retrieving the paintable property fails
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/609 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1850>
This commit is contained in:
parent
5e49f1d10e
commit
628dee9079
1 changed files with 3 additions and 3 deletions
|
@ -140,7 +140,7 @@ impl ObjectImpl for PaintableSink {
|
|||
// GtkBin was dropped for GTK4 https://gitlab.gnome.org/GNOME/gtk/-/commit/3c165b3b77
|
||||
if glib::types::Type::from_name("GtkBin").is_some() {
|
||||
gst::error!(CAT, imp = self, "Skipping the creation of paintable to avoid segfault between GTK3 and GTK4");
|
||||
return None::<&gdk::Paintable>.to_value();
|
||||
return None::<&Paintable>.to_value();
|
||||
}
|
||||
|
||||
let mut paintable_guard = self.paintable.lock().unwrap();
|
||||
|
@ -154,7 +154,7 @@ impl ObjectImpl for PaintableSink {
|
|||
Some(ref paintable) => paintable,
|
||||
None => {
|
||||
gst::error!(CAT, imp = self, "Failed to create paintable");
|
||||
return None::<&gdk::Paintable>.to_value();
|
||||
return None::<&Paintable>.to_value();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -165,7 +165,7 @@ impl ObjectImpl for PaintableSink {
|
|||
imp = self,
|
||||
"Can't retrieve Paintable from non-main thread"
|
||||
);
|
||||
return None::<&gdk::Paintable>.to_value();
|
||||
return None::<&Paintable>.to_value();
|
||||
}
|
||||
|
||||
let paintable = paintable.get_ref().clone();
|
||||
|
|
Loading…
Reference in a new issue