diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/common/history.c | 6 | ||||
-rw-r--r-- | weechat/ChangeLog | 3 | ||||
-rw-r--r-- | weechat/src/common/history.c | 6 |
4 files changed, 16 insertions, 2 deletions
@@ -1,9 +1,10 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2006-04-15 +ChangeLog - 2006-04-19 Version 0.1.9 (under dev!): + * fixed crash after /upgrade if a line in history is empty * fixed many crashes with DCC chat * added new option to customize input prompt * added nick modes diff --git a/src/common/history.c b/src/common/history.c index db61276f7..eb889ab66 100644 --- a/src/common/history.c +++ b/src/common/history.c @@ -73,6 +73,9 @@ void history_buffer_add (void *buffer, char *string) { t_history *new_history, *ptr_history; + + if (!string) + return; if ( !((t_gui_buffer *)(buffer))->history || ( ((t_gui_buffer *)(buffer))->history @@ -121,6 +124,9 @@ history_global_add (char *string) { t_history *new_history, *ptr_history; + if (!string) + return; + if (!history_global || (history_global && ascii_strcasecmp (history_global->text, string) != 0)) diff --git a/weechat/ChangeLog b/weechat/ChangeLog index 25aa0b171..cd776d80f 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -1,9 +1,10 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2006-04-15 +ChangeLog - 2006-04-19 Version 0.1.9 (under dev!): + * fixed crash after /upgrade if a line in history is empty * fixed many crashes with DCC chat * added new option to customize input prompt * added nick modes diff --git a/weechat/src/common/history.c b/weechat/src/common/history.c index db61276f7..eb889ab66 100644 --- a/weechat/src/common/history.c +++ b/weechat/src/common/history.c @@ -73,6 +73,9 @@ void history_buffer_add (void *buffer, char *string) { t_history *new_history, *ptr_history; + + if (!string) + return; if ( !((t_gui_buffer *)(buffer))->history || ( ((t_gui_buffer *)(buffer))->history @@ -121,6 +124,9 @@ history_global_add (char *string) { t_history *new_history, *ptr_history; + if (!string) + return; + if (!history_global || (history_global && ascii_strcasecmp (history_global->text, string) != 0)) |