summaryrefslogtreecommitdiff
path: root/src/gui/panels/symbols.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-10-22 10:00:41 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-10-22 10:00:41 (GMT)
commit3a259b1e1e3fe870f9d1837ea2ecf6ce5c1d0162 (patch)
tree08cc7f88479ce391b0e94241edd6a181c34664c8 /src/gui/panels/symbols.c
parentd800cb1c80ec68eb1ad85134fd9c0727023f572a (diff)
Fixed GUI bugs in the case where no binary is loaded.
Diffstat (limited to 'src/gui/panels/symbols.c')
-rw-r--r--src/gui/panels/symbols.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/panels/symbols.c b/src/gui/panels/symbols.c
index 0cbb9eb..4c8a78a 100644
--- a/src/gui/panels/symbols.c
+++ b/src/gui/panels/symbols.c
@@ -590,14 +590,24 @@ static void change_symbols_panel_current_binary(GSymbolsPanel *panel, GLoadedBin
GtkToggleToolButton *button; /* Mode de représentation */
GtkRequisition req; /* Nouvelle taille idéale */
+ /* Basculement du binaire utilisé */
+
if (panel->binary != NULL)
g_object_unref(G_OBJECT(panel->binary));
panel->binary = binary;
- g_object_ref(G_OBJECT(binary));
+
+ if (panel->binary != NULL)
+ g_object_ref(G_OBJECT(panel->binary));
gtk_tree_store_clear(panel->store);
+ /* Si le panneau actif ne représente pas un binaire... */
+
+ if (binary == NULL) return;
+
+ /* Actualisation de l'affichage */
+
button = g_object_get_data(G_OBJECT(G_EDITOR_ITEM(panel)->widget), "list");
if (gtk_toggle_tool_button_get_active(button))