[gnome-settings-daemon] sharing: Avoid a crash if we can't find the service desktop file
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] sharing: Avoid a crash if we can't find the service desktop file
- Date: Tue, 24 Jun 2014 13:22:25 +0000 (UTC)
commit 42bec6848e66cc6e9d7420aff4eae02b25259d29
Author: Rui Matos <tiagomatos gmail com>
Date: Tue Jun 24 15:16:43 2014 +0200
sharing: Avoid a crash if we can't find the service desktop file
plugins/sharing/gsd-sharing-manager.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plugins/sharing/gsd-sharing-manager.c b/plugins/sharing/gsd-sharing-manager.c
index a171a51..046a8a6 100644
--- a/plugins/sharing/gsd-sharing-manager.c
+++ b/plugins/sharing/gsd-sharing-manager.c
@@ -114,6 +114,11 @@ gsd_sharing_manager_start_service (GsdSharingManager *manager,
app = g_desktop_app_info_new (desktop);
g_free (desktop);
+ if (!app) {
+ g_warning ("Could not find desktop file for service '%s'", service->name);
+ return;
+ }
+
exec = g_app_info_get_commandline (G_APP_INFO (app));
g_object_unref (app);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]