summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-11-22 07:57:30 +0100
committerSebastien Helleu <flashcode@flashtux.org>2013-11-22 07:57:30 +0100
commit51aa15cced5efa419d9c0ddb996d5a96d7863992 (patch)
treea28050662ccd9b3ac5d18552c3627eea7e87ee68
parent58ae58d81b846d8902a0b52ffb8cb803c0fd022a (diff)
downloadweechat-51aa15cced5efa419d9c0ddb996d5a96d7863992.zip
core: fix crash on /buffer close core.weechat
-rw-r--r--ChangeLog1
-rw-r--r--src/core/wee-command.c9
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5cb5e16c7..23631b075 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);
}
}