From dd61be7c2ea238432524dea16b04baf424c2cd36 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Thu, 17 May 2012 18:08:57 -0400 Subject: [PATCH] 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. --- clutter/clutter-drop-action.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/clutter/clutter-drop-action.c b/clutter/clutter-drop-action.c index 4fec01996..8c4def2ad 100644 --- a/clutter/clutter-drop-action.c +++ b/clutter/clutter-drop-action.c @@ -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"); - data = g_object_get_data (G_OBJECT (priv->stage), "__clutter_drop_targets"); if (data == NULL) return;