diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2005-12-19 10:20:33 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2005-12-19 10:20:33 +0000 |
commit | d280bf2a92b9cdc89a99eebf410d6602d35e1cda (patch) | |
tree | a6dbad7aa27f01acee31c2433def5ddd8a9cf4fd /src/gui/gui-common.c | |
parent | f4513bbadd73dac4a36eb898e5a96e6525590a50 (diff) | |
download | weechat-d280bf2a92b9cdc89a99eebf410d6602d35e1cda.zip |
Fixed segfault when changing buffer number with only one buffer
Diffstat (limited to 'src/gui/gui-common.c')
-rw-r--r-- | src/gui/gui-common.c | 4 |
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; |