diff options
author | Rick Bell <richard.s.bell@intel.com> | 2015-02-26 11:34:08 -0800 |
---|---|---|
committer | Rick Bell <richard.s.bell@intel.com> | 2015-02-26 11:34:08 -0800 |
commit | dcfacf9f24bc3e1ce9ed4c19385fe870ac9f2d1c (patch) | |
tree | c20b7382570840ac1bbdf5ebf1b884cedf5ac054 /libdleyna/core/main-loop.c | |
parent | 9ddd3d607ed656188ef09516c254b2d51a228ce4 (diff) | |
parent | 52d2ccdaac182b2fa2b36dfb21e4a7a41fac4c8d (diff) | |
download | dleyna-core-dcfacf9f24bc3e1ce9ed4c19385fe870ac9f2d1c.tar.gz |
Merge pull request #43 from KobaltRo/master
Gracefully exit in case of dbus session crash
Diffstat (limited to 'libdleyna/core/main-loop.c')
-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); |