1
0
Fork 0

clutter/color-state: Allow comparing NULL color states

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
This commit is contained in:
Sebastian Wick 2024-08-07 23:56:40 +02:00 committed by Marge Bot
parent 0ed160bc5a
commit d8ecd07f9f

View file

@ -843,12 +843,15 @@ clutter_color_state_equals (ClutterColorState *color_state,
ClutterColorStatePrivate *priv;
ClutterColorStatePrivate *other_priv;
g_return_val_if_fail (CLUTTER_IS_COLOR_STATE (color_state), FALSE);
g_return_val_if_fail (CLUTTER_IS_COLOR_STATE (other_color_state), FALSE);
if (color_state == other_color_state)
return TRUE;
if (color_state == NULL || other_color_state == NULL)
return FALSE;
g_return_val_if_fail (CLUTTER_IS_COLOR_STATE (color_state), FALSE);
g_return_val_if_fail (CLUTTER_IS_COLOR_STATE (other_color_state), FALSE);
priv = clutter_color_state_get_instance_private (color_state);
other_priv = clutter_color_state_get_instance_private (other_color_state);