1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Some crashfixes with command history.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2277 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-12-20 21:52:16 +00:00 committed by cras
parent 9ddebe6bcf
commit d87d8caece
2 changed files with 1 additions and 3 deletions

View File

@ -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)

View File

@ -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);