[gupnp-tools] upload: Fix critical on shutdown
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp-tools] upload: Fix critical on shutdown
- Date: Sun, 11 Jan 2015 08:58:48 +0000 (UTC)
commit 1a1bf03723d2383fc0affb6d94565038f83b600e
Author: Jens Georg <mail jensge org>
Date: Wed Dec 31 01:34:21 2014 +0100
upload: Fix critical on shutdown
Signed-off-by: Jens Georg <mail jensge org>
src/upload/main.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/upload/main.c b/src/upload/main.c
index ca6a816..a713def 100644
--- a/src/upload/main.c
+++ b/src/upload/main.c
@@ -123,7 +123,8 @@ target_cds_found (GUPnPServiceProxy *target_cds_proxy)
void
application_exit (void)
{
- g_main_loop_quit (main_loop);
+ if (main_loop != NULL)
+ g_main_loop_quit (main_loop);
}
gint
@@ -190,7 +191,7 @@ main (gint argc,
g_main_loop_run (main_loop);
/* Clean-up */
- g_main_loop_unref (main_loop);
+ g_clear_pointer (&main_loop, g_main_loop_unref);
deinit_control_point ();
g_object_unref (upnp_context);
g_option_context_free (context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]