summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-12-19 10:20:33 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-12-19 10:20:33 +0000
commitd280bf2a92b9cdc89a99eebf410d6602d35e1cda (patch)
treea6dbad7aa27f01acee31c2433def5ddd8a9cf4fd /src/gui
parentf4513bbadd73dac4a36eb898e5a96e6525590a50 (diff)
downloadweechat-d280bf2a92b9cdc89a99eebf410d6602d35e1cda.zip
Fixed segfault when changing buffer number with only one buffer
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/gui-common.c b/src/gui/gui-common.c
index 5f67d2ce7..7fb21db58 100644
--- a/src/gui/gui-common.c
+++ b/src/gui/gui-common.c
@@ -1543,6 +1543,10 @@ gui_buffer_move_to_number (t_gui_window *window, int number)
t_gui_buffer *ptr_buffer;
int i;
+ /* if only one buffer then return */
+ if (gui_buffers == last_gui_buffer)
+ return;
+
/* buffer number is already ok ? */
if (number == window->buffer->number)
return;