mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
clutter/actor: Handle _clutter_actor_get_debug_name(NULL)
NULL actor pointers seem to arise sometimes in `clutter_stage_update_device` when using a touchscreen, but that's only fatal with `CLUTTER_DEBUG=event`. So just handle NULL where it was crashing: `_clutter_actor_get_debug_name`. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3413>
This commit is contained in:
parent
9ddb0371c6
commit
f74fe6bd67
@ -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 "<unnamed>[<ClutterActor>NULL]";
|
||||
|
||||
priv = actor->priv;
|
||||
|
||||
if (G_UNLIKELY (priv->debug_name == NULL))
|
||||
{
|
||||
priv->debug_name = g_strdup_printf ("<%s>[<%s>:%p]",
|
||||
|
Loading…
Reference in New Issue
Block a user