From 190f66ab3a2c8bdf2f56b2f590afe49461e6cf24 Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Wed, 27 Dec 2017 23:45:05 +0100
Subject: Updated the error panel summary in the main thread.

---
 ChangeLog               | 5 +++++
 src/gui/panels/errors.c | 7 +++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8116e75..5bbfb9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 17-12-27  Cyrille Bagard <nocbos@gmail.com>
 
+	* src/gui/panels/errors.c:
+	Update the error panel summary in the main thread.
+
+17-12-27  Cyrille Bagard <nocbos@gmail.com>
+
 	* src/analysis/loading.c:
 	* src/analysis/project.c:
 	* src/analysis/project.h:
diff --git a/src/gui/panels/errors.c b/src/gui/panels/errors.c
index 57fedaf..f62e684 100644
--- a/src/gui/panels/errors.c
+++ b/src/gui/panels/errors.c
@@ -37,6 +37,7 @@
 #include "../core/global.h"
 #include "../../core/global.h"
 #include "../../format/format.h"
+#include "../../glibext/signal.h"
 #include "../../gtkext/support.h"
 
 
@@ -469,7 +470,8 @@ static void update_panel_with_binary_errors(GErrorPanel *panel, GLoadedBinary *b
                                 fcount + pcount,
                                 (pu_fallback_cb)update_error_panel);
 
-    g_signal_connect(update, "work-completed", G_CALLBACK(update_error_panel_summary), panel);
+    g_signal_connect_to_main(update, "work-completed", G_CALLBACK(update_error_panel_summary), panel,
+                             g_cclosure_marshal_VOID__VOID);
 
     g_work_queue_schedule_work(get_work_queue(), G_DELAYED_WORK(update), DEFAULT_WORK_GROUP);
 
@@ -772,7 +774,8 @@ static void on_error_filter_toggled(GtkToggleButton *button, GErrorPanel *panel)
                                 panel->count,
                                 (pu_fallback_cb)filter_error_panel);
 
-    g_signal_connect(update, "work-completed", G_CALLBACK(update_error_panel_summary), panel);
+    g_signal_connect_to_main(update, "work-completed", G_CALLBACK(update_error_panel_summary), panel,
+                             g_cclosure_marshal_VOID__VOID);
 
     g_work_queue_schedule_work(get_work_queue(), G_DELAYED_WORK(update), DEFAULT_WORK_GROUP);
 
-- 
cgit v0.11.2-87-g4458