diff options
author | Cornel Spinu <cornel.spinu@windriver.com> | 2014-07-03 16:28:22 +0300 |
---|---|---|
committer | Cornel Spinu <cornel.spinu@windriver.com> | 2014-07-03 16:28:22 +0300 |
commit | 52d2ccdaac182b2fa2b36dfb21e4a7a41fac4c8d (patch) | |
tree | 8a543659ffd7136623d2fc31857d5adb55627494 | |
parent | 46c830e2b4fb023a51d59b81792dffe22000faff (diff) | |
download | dleyna-core-52d2ccdaac182b2fa2b36dfb21e4a7a41fac4c8d.tar.gz |
Gracefully exit in case of dbus session crash
-rw-r--r-- | libdleyna/core/main-loop.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libdleyna/core/main-loop.c b/libdleyna/core/main-loop.c index 3d80402..dfb3b2b 100644 --- a/libdleyna/core/main-loop.c +++ b/libdleyna/core/main-loop.c @@ -57,8 +57,11 @@ static gboolean prv_context_quit_cb(gpointer user_data) { DLEYNA_LOG_DEBUG("Quitting"); - g_context.connector->disconnect(); - g_context.control_point->stop_service(); + if (g_context.connection != NULL) + { + g_context.connector->disconnect(); + g_context.control_point->stop_service(); + } g_timeout_add_seconds(1, prv_context_mainloop_quit_cb, NULL); |