mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04: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_unlink(window->history_name);
|
||||||
command_history_destroy(window->history);
|
command_history_destroy(window->history);
|
||||||
|
|
||||||
g_free_not_null(window->history_name);
|
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)
|
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;
|
char *oldname;
|
||||||
oldname = window->history_name;
|
oldname = window->history_name;
|
||||||
|
|
||||||
if (*name == '\0')
|
if (name == NULL || *name == '\0')
|
||||||
window->history_name = NULL;
|
window->history_name = NULL;
|
||||||
else
|
else
|
||||||
window->history_name = g_strdup(name);
|
window->history_name = g_strdup(name);
|
||||||
|
Loading…
Reference in New Issue
Block a user