Commit 1f5b4a61 authored by Robert Ancell's avatar Robert Ancell Committed by Robert Ancell

sharing: Fix warning when disabling sharing

The warning is:
(gnome-control-center:29760): Gtk-CRITICAL **: 11:45:48.076: gtk_widget_is_visible: assertion 'GTK_IS_WIDGET (widget)' failed

This is due to the code trying to disable switches that only exist if support
for that feature is available.
parent e9b9966e
Pipeline #56279 passed with stages
in 4 minutes and 3 seconds
......@@ -109,7 +109,7 @@ struct _CcSharingPanel
CC_PANEL_REGISTER (CcSharingPanel, cc_sharing_panel)
#define OFF_IF_VISIBLE(x) { if (gtk_widget_is_visible(x) && gtk_widget_is_sensitive(x)) gtk_switch_set_active (GTK_SWITCH(x), FALSE); }
#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); }
static void
cc_sharing_panel_master_switch_notify (GtkSwitch *gtkswitch,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment