From 265c5b74cb433ac3dbea29e6633d0423125eb85b Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Wed, 11 Jun 2014 16:24:23 -0400 Subject: [PATCH] gnome: don't crash if device is plugged/unplugged Widgets in the preferences dialog were being modified by incoming D-Bus signals. For now, a warning is issued and the signal is ignored in this case. In the future, this signal should only be connected while the preferences window exists. Refs #49540 Change-Id: I2058b169af6c9732cc7f63ee25050d04cea0e01c --- gnome/src/config/videoconf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnome/src/config/videoconf.c b/gnome/src/config/videoconf.c index 9ba4d99068..96b52578bb 100644 --- a/gnome/src/config/videoconf.c +++ b/gnome/src/config/videoconf.c @@ -547,6 +547,8 @@ videocodecs_box(account_t *acc) static void reset_combo_box(GtkComboBoxText *combo, gchar **entries, const gchar *preferred) { + g_assert(GTK_IS_WIDGET(combo)); + guint index = 0; /* first one if not found */ /* Temporarily deactivate the "changed" signal to clear the list */ @@ -673,6 +675,8 @@ combo_box_rate_changed_cb(G_GNUC_UNUSED GtkComboBoxText *combo, gpointer data) void video_device_event_cb(G_GNUC_UNUSED DBusGProxy *proxy, G_GNUC_UNUSED gpointer foo) { + /* FIXME: get rid of these global widgets */ + g_return_if_fail(GTK_IS_WIDGET(v4l2Device)); fill_devices(); } -- GitLab