summaryrefslogtreecommitdiff
path: root/src/glibext/delayed.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glibext/delayed.c')
-rw-r--r--src/glibext/delayed.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/glibext/delayed.c b/src/glibext/delayed.c
index ec4063d..6b5ac35 100644
--- a/src/glibext/delayed.c
+++ b/src/glibext/delayed.c
@@ -33,7 +33,9 @@
#include "delayed-int.h"
#include "../core/nproc.h"
-#include "../gui/core/global.h"
+#ifdef INCLUDE_GTK_SUPPORT
+# include "../gui/core/global.h"
+#endif
@@ -612,7 +614,11 @@ static void *g_work_group_process(GWorkGroup *group)
g_mutex_unlock(&group->mutex);
+#ifdef INCLUDE_GTK_SUPPORT
status = get_global_status();
+#else
+ status = NULL;
+#endif
g_delayed_work_process(work, status);
g_object_unref(G_OBJECT(work));
@@ -879,7 +885,7 @@ static void g_work_queue_dispose(GWorkQueue *queue)
g_mutex_lock(&queue->mutex);
for (i = 0; i < queue->groups_count; i++)
- g_object_unref(G_OBJECT(queue->groups[i]));
+ g_clear_object(&queue->groups[i]);
g_mutex_unlock(&queue->mutex);