summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/buflist/buflist-bar-item.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c
index 6abfb64ab..d60ecfb45 100644
--- a/src/plugins/buflist/buflist-bar-item.c
+++ b/src/plugins/buflist/buflist-bar-item.c
@@ -104,8 +104,11 @@ buflist_bar_item_bar_can_scroll (struct t_gui_bar *bar)
if (!items_subcount || (items_subcount[0] <= 0))
return 0;
items_name = weechat_hdata_pointer (buflist_hdata_bar, bar, "items_name");
- if (!items_name || (strcmp (items_name[0][0], BUFLIST_BAR_ITEM_NAME) != 0))
+ if (!items_name || !items_name[0] || !items_name[0][0]
+ || (strcmp (items_name[0][0], BUFLIST_BAR_ITEM_NAME) != 0))
+ {
return 0;
+ }
/* OK, bar can be scrolled! */
return 1;