diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c index 323a44e81..81e2db99e 100644 --- a/clutter/clutter/clutter-actor.c +++ b/clutter/clutter/clutter-actor.c @@ -998,9 +998,14 @@ G_DEFINE_TYPE_WITH_CODE (ClutterActor, const char * _clutter_actor_get_debug_name (ClutterActor *actor) { - ClutterActorPrivate *priv = actor->priv; + ClutterActorPrivate *priv; const char *retval; + if (!actor) + return "[NULL]"; + + priv = actor->priv; + if (G_UNLIKELY (priv->debug_name == NULL)) { priv->debug_name = g_strdup_printf ("<%s>[<%s>:%p]",