summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-12-30 15:24:51 -0500
committerMatthias Clasen <mclasen@redhat.com>2019-12-30 16:03:47 -0500
commit67d1d5ec80a993757f4a1c3e045ec8ad41257df1 (patch)
treeb47bdc098141c0ffd234fcc3e5741772f4d7ff37 /gtk
parent49c6e9997056ae2cdab670eb88e5d98ab4763ba2 (diff)
downloadgtk+-67d1d5ec80a993757f4a1c3e045ec8ad41257df1.tar.gz
mountoperation: Handle D-Bus missing
Still not great to make sync calls here, but at least we should handle failure without criticals.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkmountoperation.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c
index b94d124818..ebcdba0f2b 100644
--- a/gtk/gtkmountoperation.c
+++ b/gtk/gtkmountoperation.c
@@ -202,6 +202,9 @@ gtk_mount_operation_init (GtkMountOperation *operation)
"org.gtk.MountOperationHandler",
"/org/gtk/MountOperationHandler",
NULL, NULL);
+ if (!operation->priv->handler)
+ return;
+
name_owner = g_dbus_proxy_get_name_owner (G_DBUS_PROXY (operation->priv->handler));
if (!name_owner)
g_clear_object (&operation->priv->handler);