Commit d38bf482 authored by Javier Jardón's avatar Javier Jardón

gtkrange: Add some checks to gtk_range_set_slider_size_fixed()

Recalculate layout only if the range is already mapped and
adjustment is not NULL.
parent 65a28efc
......@@ -961,9 +961,12 @@ gtk_range_set_slider_size_fixed (GtkRange *range,
{
range->slider_size_fixed = size_fixed ? TRUE : FALSE;
range->need_recalc = TRUE;
gtk_range_calc_layout (range, range->adjustment->value);
gtk_widget_queue_draw (GTK_WIDGET (range));
if (range->adjustment && gtk_widget_get_mapped (GTK_WIDGET (range)))
{
range->need_recalc = TRUE;
gtk_range_calc_layout (range, gtk_adjustment_get_value (range->adjustment));
gtk_widget_queue_draw (GTK_WIDGET (range));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment