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:
parent
9ddebe6bcf
commit
d87d8caece
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user