diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-04-19 12:35:30 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-04-19 12:35:30 +0000 |
commit | a56d65a7c0a81f4f26a6c3f545ab9b97e4e5b853 (patch) | |
tree | 5c3d4d5d3d69e7081f0a1ec16e44b82e6b069ac3 /src/common/history.c | |
parent | 5af8e4f6e7bb6a8c60798dae694edc1ec765c575 (diff) | |
download | weechat-a56d65a7c0a81f4f26a6c3f545ab9b97e4e5b853.zip |
Fixed crash after /upgrade if a line in history is empty
Diffstat (limited to 'src/common/history.c')
-rw-r--r-- | src/common/history.c | 6 |
1 files changed, 6 insertions, 0 deletions
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)) |