diff --git a/clutter/clutter/clutter-color-state.c b/clutter/clutter/clutter-color-state.c index 65c9fbf12..d6dec5075 100644 --- a/clutter/clutter/clutter-color-state.c +++ b/clutter/clutter/clutter-color-state.c @@ -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);