summaryrefslogtreecommitdiff
path: root/gio/gsimpleasyncresult.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-09-29 11:25:13 +0200
committerAlexander Larsson <alexl@redhat.com>2009-09-29 11:27:15 +0200
commit90e1308809805691713edf8f651e80a063f9b66f (patch)
tree36a15ca848533e21ece7d4e1581c453c8ede4208 /gio/gsimpleasyncresult.c
parent10c7b3a17e00283907139a19f1c6054f85a5d3a8 (diff)
downloadglib-90e1308809805691713edf8f651e80a063f9b66f.tar.gz
Avoid critical error in thread check if source is destroyed
The source can be destroyed by the time we complete the result, and then the g_source_get_context(current_source) call will cause a critical error. We check for the source being destroyed and avoid the check in that case. This means we miss the right-thread check in this case, but thats merely a helper, so this is not critical.
Diffstat (limited to 'gio/gsimpleasyncresult.c')
-rw-r--r--gio/gsimpleasyncresult.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gio/gsimpleasyncresult.c b/gio/gsimpleasyncresult.c
index e17793714..3fa43f049 100644
--- a/gio/gsimpleasyncresult.c
+++ b/gio/gsimpleasyncresult.c
@@ -574,7 +574,7 @@ g_simple_async_result_complete (GSimpleAsyncResult *simple)
#ifndef G_DISABLE_CHECKS
current_source = g_main_current_source ();
- if (current_source)
+ if (current_source && !g_source_is_destroyed (current_source))
{
current_context = g_source_get_context (current_source);
if (current_context == g_main_context_default ())