ClutterDropAction: Avoid accessing priv->stage is not yet resolved.

This fixes drop_action_unregister() to not call g_object_get_data()
on priv->stage if not yet resolved. This can happen if the action's
actor was destroyed before ever being mapped.
This commit is contained in:
Tristan Van Berkom 2012-05-17 18:08:57 -04:00 committed by Emmanuele Bassi
parent 2c5af0c868
commit dd61be7c2e

View File

@ -276,9 +276,11 @@ static void
drop_action_unregister (ClutterDropAction *self)
{
ClutterDropActionPrivate *priv = self->priv;
DropTarget *data;
DropTarget *data = NULL;
if (priv->stage != NULL)
data = g_object_get_data (G_OBJECT (priv->stage), "__clutter_drop_targets");
if (data == NULL)
return;