click-action: Be resilient against NULL pointers
Do not try to disconnect signal handlers from NULL pointers.
This commit is contained in:
parent
8e6b3914ef
commit
dbf3b607bf
@ -433,13 +433,17 @@ clutter_click_action_set_actor (ClutterActorMeta *meta,
|
|||||||
{
|
{
|
||||||
ClutterActor *old_actor = clutter_actor_meta_get_actor (meta);
|
ClutterActor *old_actor = clutter_actor_meta_get_actor (meta);
|
||||||
|
|
||||||
|
if (old_actor != NULL)
|
||||||
g_signal_handler_disconnect (old_actor, priv->event_id);
|
g_signal_handler_disconnect (old_actor, priv->event_id);
|
||||||
|
|
||||||
priv->event_id = 0;
|
priv->event_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->capture_id != 0)
|
if (priv->capture_id != 0)
|
||||||
{
|
{
|
||||||
|
if (priv->stage != NULL)
|
||||||
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||||
|
|
||||||
priv->capture_id = 0;
|
priv->capture_id = 0;
|
||||||
priv->stage = NULL;
|
priv->stage = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user