mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
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);
|
||||
|
||||
g_signal_handler_disconnect (old_actor, priv->event_id);
|
||||
if (old_actor != NULL)
|
||||
g_signal_handler_disconnect (old_actor, priv->event_id);
|
||||
|
||||
priv->event_id = 0;
|
||||
}
|
||||
|
||||
if (priv->capture_id != 0)
|
||||
{
|
||||
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||
if (priv->stage != NULL)
|
||||
g_signal_handler_disconnect (priv->stage, priv->capture_id);
|
||||
|
||||
priv->capture_id = 0;
|
||||
priv->stage = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user