profiling: Avoid criticals

With events no longer GObjects, the type class is
longer around for peeking.
This commit is contained in:
Matthias Clasen 2020-02-21 07:23:40 -05:00
parent 77e1fd01c3
commit 376f5eacbd

View File

@ -4035,11 +4035,14 @@ add_event_mark (GdkEvent *event,
{
gchar *message = NULL;
const gchar *kind;
GEnumClass *class;
GEnumValue *value;
GdkEventType event_type;
event_type = gdk_event_get_event_type (event);
value = g_enum_get_value (g_type_class_peek_static (GDK_TYPE_EVENT_TYPE), event_type);
class = g_type_class_ref (GDK_TYPE_EVENT_TYPE);
value = g_enum_get_value (class, event_type);
g_type_class_unref (class);
kind = value ? value->value_nick : NULL;
switch (event_type)