GtkScrolledWindow: Avoid a test failure

The change to take out unneeded NULL checks requires some care
at startup: we check both adjustments when any of them changes;
we need to do those checks in the same order in which we create
the scrollbars, otherwise we'll try to get the adjustment of
the vscrollbar when we just set the up the hscrollbars' adjustment.
This commit is contained in:
Matthias Clasen 2014-05-22 06:00:09 -04:00
parent a61a11a4ea
commit d01a291dbc

View File

@ -2890,10 +2890,10 @@ gtk_scrolled_window_adjustment_value_changed (GtkAdjustment *adjustment,
return;
/* Ensure GtkAdjustment and unclamped values are in sync */
if (adjustment == gtk_range_get_adjustment (GTK_RANGE (priv->vscrollbar)))
priv->unclamped_vadj_value = gtk_adjustment_get_value (adjustment);
else if (adjustment == gtk_range_get_adjustment (GTK_RANGE (priv->hscrollbar)))
if (adjustment == gtk_range_get_adjustment (GTK_RANGE (priv->hscrollbar)))
priv->unclamped_hadj_value = gtk_adjustment_get_value (adjustment);
else if (adjustment == gtk_range_get_adjustment (GTK_RANGE (priv->vscrollbar)))
priv->unclamped_vadj_value = gtk_adjustment_get_value (adjustment);
}
static void