diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-04-03 23:31:45 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-04-03 23:31:45 -0400 |
commit | 5205fa0ff7635154a76e7c810bfc00cf041029ca (patch) | |
tree | af259ff19568ee6cd3f9bcc77e56e445b3192da6 /gtk/gtkscrollbar.c | |
parent | 339d3e41b028344e647d7a5795ace4eb53085ddd (diff) | |
download | gtk+-5205fa0ff7635154a76e7c810bfc00cf041029ca.tar.gz |
scrollbar: Be more defensive
Somehow the scrollbar accessible manages to call
gtk_scrollbar_get_adjustment when priv->range is NULL.
Survive taht.
Diffstat (limited to 'gtk/gtkscrollbar.c')
-rw-r--r-- | gtk/gtkscrollbar.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkscrollbar.c b/gtk/gtkscrollbar.c index 97730e1eea..84b18c02dc 100644 --- a/gtk/gtkscrollbar.c +++ b/gtk/gtkscrollbar.c @@ -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; } |