From 08f68cce403ae73014e03f5dc62640753f290ce7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 26 Mar 2021 11:09:50 -0400 Subject: [PATCH] gdk: Add an arg check to gdk_device_get_timestamp Pointed out by Emmanuele Bassi. --- gdk/gdkdevice.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c index ea0b78fb28..b36ce7f708 100644 --- a/gdk/gdkdevice.c +++ b/gdk/gdkdevice.c @@ -1407,5 +1407,7 @@ gdk_device_set_timestamp (GdkDevice *device, guint32 gdk_device_get_timestamp (GdkDevice *device) { + g_return_val_if_fail (GDK_IS_DEVICE (device), GDK_CURRENT_TIME); + return device->timestamp; }