Blame SOURCES/0001-sharing-Fix-warning-when-disabling-sharing.patch

a780b2
From 5502611f0cfe7083c2b2a650385ea4554cb73ac9 Mon Sep 17 00:00:00 2001
a780b2
From: Robert Ancell <robert.ancell@canonical.com>
a780b2
Date: Mon, 15 Oct 2018 11:49:19 +1300
a780b2
Subject: [PATCH 3/4] sharing: Fix warning when disabling sharing
a780b2
a780b2
The warning is:
a780b2
(gnome-control-center:29760): Gtk-CRITICAL **: 11:45:48.076: gtk_widget_is_visible: assertion 'GTK_IS_WIDGET (widget)' failed
a780b2
a780b2
This is due to the code trying to disable switches that only exist if support
a780b2
for that feature is available.
a780b2
---
a780b2
 panels/sharing/cc-sharing-panel.c | 2 +-
a780b2
 1 file changed, 1 insertion(+), 1 deletion(-)
a780b2
a780b2
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
a780b2
index 8b35c9a31..98f2d69ef 100644
a780b2
--- a/panels/sharing/cc-sharing-panel.c
a780b2
+++ b/panels/sharing/cc-sharing-panel.c
a780b2
@@ -91,7 +91,7 @@ struct _CcSharingPanelPrivate
a780b2
   guint remote_desktop_name_watch;
a780b2
 };
a780b2
 
a780b2
-#define OFF_IF_VISIBLE(x) { if (gtk_widget_is_visible(x) && gtk_widget_is_sensitive(x)) gtk_switch_set_active (GTK_SWITCH(x), FALSE); }
a780b2
+#define OFF_IF_VISIBLE(x) { if ((x) != NULL && gtk_widget_is_visible(x) && gtk_widget_is_sensitive(x)) gtk_switch_set_active (GTK_SWITCH(x), FALSE); }
a780b2
 
a780b2
 static void
a780b2
 cc_sharing_panel_master_switch_notify (GtkSwitch      *gtkswitch,
a780b2
-- 
a780b2
2.24.0
a780b2