diff options
Diffstat (limited to 'gtk/gtkpathbar.c')
-rw-r--r-- | gtk/gtkpathbar.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index d384d6558..f77c8b366 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -707,7 +707,10 @@ gtk_path_bar_scroll_down (GtkWidget *button, GtkPathBar *path_bar) } } - space_needed = BUTTON_DATA (down_button->data)->button->allocation.width + path_bar->spacing; + /* We check if down_button might be NULL in cases where the pathbar's horizontal size is smaller + * than the button and it doesn't get displayed. e.g., on Windows it might be "My Documents and Settings" + */ + space_needed = down_button ? BUTTON_DATA (down_button->data)->button->allocation.width : 0 + path_bar->spacing; if (direction == GTK_TEXT_DIR_RTL) space_available = path_bar->down_slider_button->allocation.x - GTK_WIDGET (path_bar)->allocation.x; else |