From d87d8caeceee1c92075d7a30a218cbd80a4ff072 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 20 Dec 2001 21:52:16 +0000 Subject: [PATCH] Some crashfixes with command history. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2277 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/command-history.c | 2 -- src/fe-common/core/fe-windows.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/fe-common/core/command-history.c b/src/fe-common/core/command-history.c index 1642c798..18abd834 100644 --- a/src/fe-common/core/command-history.c +++ b/src/fe-common/core/command-history.c @@ -221,9 +221,7 @@ static void sig_window_destroyed(WINDOW_REC *window) { command_history_unlink(window->history_name); command_history_destroy(window->history); - g_free_not_null(window->history_name); - g_free_not_null(window->history); } static void sig_window_history_changed(WINDOW_REC *window, const char *oldname) diff --git a/src/fe-common/core/fe-windows.c b/src/fe-common/core/fe-windows.c index 53ff7a02..fc4766d9 100644 --- a/src/fe-common/core/fe-windows.c +++ b/src/fe-common/core/fe-windows.c @@ -200,7 +200,7 @@ void window_set_history(WINDOW_REC *window, const char *name) char *oldname; oldname = window->history_name; - if (*name == '\0') + if (name == NULL || *name == '\0') window->history_name = NULL; else window->history_name = g_strdup(name);