clutter/color-state: Allow comparing NULL color states
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3930>
This commit is contained in:
parent
0ed160bc5a
commit
d8ecd07f9f
1 changed files with 6 additions and 3 deletions
|
@ -843,12 +843,15 @@ clutter_color_state_equals (ClutterColorState *color_state,
|
||||||
ClutterColorStatePrivate *priv;
|
ClutterColorStatePrivate *priv;
|
||||||
ClutterColorStatePrivate *other_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)
|
if (color_state == other_color_state)
|
||||||
return TRUE;
|
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);
|
priv = clutter_color_state_get_instance_private (color_state);
|
||||||
other_priv = clutter_color_state_get_instance_private (other_color_state);
|
other_priv = clutter_color_state_get_instance_private (other_color_state);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue