diff options
Diffstat (limited to 'src/gui/core/panels.c')
-rw-r--r-- | src/gui/core/panels.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/core/panels.c b/src/gui/core/panels.c index 9cc0592..8505f37 100644 --- a/src/gui/core/panels.c +++ b/src/gui/core/panels.c @@ -25,6 +25,9 @@ #include "panels.h" +#include <malloc.h> + + #include "global.h" #include "items.h" #include "../panel-int.h" @@ -221,10 +224,10 @@ GPanelItem *get_panel_item_by_name(const char *name) bool look_for_named_panel(GPanelItem *item, GPanelItem **found) { - const char *key; /* Clef à utiliser */ + char *key; /* Clef à utiliser */ bool status; /* Bilan de la comparaison */ - key = g_editor_item_get_name(G_EDITOR_ITEM(item)); + key = g_editor_item_get_key(G_EDITOR_ITEM(item)); if (strcmp(key, name) == 0) { @@ -234,6 +237,8 @@ GPanelItem *get_panel_item_by_name(const char *name) else status = true; + free(key); + return status; } |