diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-11-22 07:57:30 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-11-22 07:57:30 +0100 |
commit | 51aa15cced5efa419d9c0ddb996d5a96d7863992 (patch) | |
tree | a28050662ccd9b3ac5d18552c3627eea7e87ee68 | |
parent | 58ae58d81b846d8902a0b52ffb8cb803c0fd022a (diff) | |
download | weechat-51aa15cced5efa419d9c0ddb996d5a96d7863992.zip |
core: fix crash on /buffer close core.weechat
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/core/wee-command.c | 9 |
2 files changed, 9 insertions, 1 deletions
@@ -11,6 +11,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] == Version 0.4.3 (under dev) +* core: fix crash on /buffer close core.weechat * core: add option "libs" for command /debug * core: apply color attributes when clearing a window (patch #8236) * core: set option weechat.look.paste_bracketed to "on" by default diff --git a/src/core/wee-command.c b/src/core/wee-command.c index b2677346f..0e1092c5c 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -837,7 +837,14 @@ COMMAND_CALLBACK(buffer) else { ptr_buffer = gui_buffer_search_by_full_name (argv_eol[2]); - if (ptr_buffer) + if (ptr_buffer == weechat_buffer) + { + gui_chat_printf (NULL, + _("%sError: WeeChat main buffer can't be " + "closed"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]); + } + else gui_buffer_close (ptr_buffer); } } |