summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@collabora.co.uk>2013-02-06 19:44:02 -0500
committerYouness Alaoui <youness.alaoui@collabora.co.uk>2013-02-06 19:44:02 -0500
commit73e28d8aa6255b48184180dceff92a152fab725e (patch)
treec7c100ff5f5a0b8736c0c32762e9f857b161a445 /examples
parent91b4003af129857f1252fbb0af79fc6cca1296b4 (diff)
downloadlibnice-73e28d8aa6255b48184180dceff92a152fab725e.tar.gz
Do not unref the mainloop until the thread has joined since it could be still using it
Diffstat (limited to 'examples')
-rw-r--r--examples/sdp-example.c2
-rw-r--r--examples/threaded-example.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/sdp-example.c b/examples/sdp-example.c
index f13382e..caf1cc2 100644
--- a/examples/sdp-example.c
+++ b/examples/sdp-example.c
@@ -101,8 +101,8 @@ main(int argc, char *argv[])
g_main_loop_run (gloop);
exit_thread = TRUE;
- g_main_loop_unref(gloop);
g_thread_join (gexamplethread);
+ g_main_loop_unref(gloop);
return EXIT_SUCCESS;
}
diff --git a/examples/threaded-example.c b/examples/threaded-example.c
index a2dde31..c102b0c 100644
--- a/examples/threaded-example.c
+++ b/examples/threaded-example.c
@@ -110,8 +110,8 @@ main(int argc, char *argv[])
g_main_loop_run (gloop);
exit_thread = TRUE;
- g_main_loop_unref(gloop);
g_thread_join (gexamplethread);
+ g_main_loop_unref(gloop);
return EXIT_SUCCESS;
}