[gnome-photos] application: Handle failures to create GomMiner proxies
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] application: Handle failures to create GomMiner proxies
- Date: Thu, 8 Oct 2015 15:57:38 +0000 (UTC)
commit 3c8a9f3649f907c3497353f6a73c4390b24eae9a
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Oct 8 17:02:24 2015 +0200
application: Handle failures to create GomMiner proxies
I came across a few intermittent failures to create the GomMiner
proxies while running goa-daemon under valgrind. Let's atleast handle
the failures and print the error message.
src/photos-application.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index fd0d916..17d0760 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -845,12 +845,19 @@ photos_application_startup (GApplication *application)
GomMiner *miner;
const gchar *extension_name;
+ error = NULL;
miner = gom_miner_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
base_item_class->miner_name,
base_item_class->miner_object_path,
NULL,
- NULL);
+ &error);
+ if (error != NULL)
+ {
+ g_warning ("Unable to create GomMiner proxy for %s: %s", base_item_class->miner_name,
error->message);
+ g_error_free (error);
+ continue;
+ }
extension_name = g_io_extension_get_name (extension);
g_object_set_data_full (G_OBJECT (miner), "provider-type", g_strdup (extension_name), g_free);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]