summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-08-21 17:32:21 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-08-21 17:32:21 (GMT)
commitd0ad2affea4ea7d0e91c1dba73138f59db1143fe (patch)
treeb9b977593b355ebede876544a33582ed10548432
parentae7ceae08e2ef0fc2588992e3e53765f3fd47b8e (diff)
Avoided a crash in the errors panel when no binary is loaded.
-rw-r--r--src/gui/panels/errors.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/panels/errors.c b/src/gui/panels/errors.c
index b405d04..b258ecf 100644
--- a/src/gui/panels/errors.c
+++ b/src/gui/panels/errors.c
@@ -1167,13 +1167,17 @@ static void g_error_panel_conclude(GErrorPanel *panel, unsigned int uid, error_u
treeview = GTK_TREE_VIEW(gtk_builder_get_object(builder, "treeview"));
- proc = g_loaded_binary_get_processor(panel->binary);
+ if (panel->binary != NULL)
+ {
+ proc = g_loaded_binary_get_processor(panel->binary);
- virt_col = gtk_tree_view_get_column(treeview, 1);
+ virt_col = gtk_tree_view_get_column(treeview, 1);
- gtk_tree_view_column_set_visible(virt_col, g_arch_processor_has_virtual_space(proc));
+ gtk_tree_view_column_set_visible(virt_col, g_arch_processor_has_virtual_space(proc));
- g_object_unref(G_OBJECT(proc));
+ g_object_unref(G_OBJECT(proc));
+
+ }
model = GTK_TREE_MODEL(gtk_builder_get_object(builder, "filter"));