scrollbar: Be more defensive

Somehow the scrollbar accessible manages to call
gtk_scrollbar_get_adjustment when priv->range is NULL.
Survive taht.
This commit is contained in:
Matthias Clasen 2020-04-03 23:31:45 -04:00
parent 339d3e41b0
commit 5205fa0ff7

View File

@ -285,5 +285,8 @@ gtk_scrollbar_get_adjustment (GtkScrollbar *self)
g_return_val_if_fail (GTK_IS_SCROLLBAR (self), NULL);
return gtk_range_get_adjustment (GTK_RANGE (priv->range));
if (priv->range)
return gtk_range_get_adjustment (GTK_RANGE (priv->range));
return NULL;
}