Merge branch 'fix-spinner-stop' into 'main'

gtkcssanimatedstyle: Fix return of new_advance()

Closes #4426

See merge request GNOME/gtk!5420
This commit is contained in:
Matthias Clasen 2023-01-13 20:14:25 +00:00
commit d4ec1afe44

View File

@ -937,9 +937,12 @@ gtk_css_animated_style_new_advance (GtkCssAnimatedStyle *source,
gtk_internal_return_val_if_fail (GTK_IS_CSS_ANIMATED_STYLE (source), NULL);
gtk_internal_return_val_if_fail (GTK_IS_CSS_STYLE (base_style), NULL);
if (timestamp == 0 || timestamp == source->current_time)
if (timestamp == 0)
return g_object_ref (source->style);
if (timestamp == source->current_time)
return g_object_ref (GTK_CSS_STYLE (source));
gtk_internal_return_val_if_fail (timestamp > source->current_time, NULL);
animations = NULL;