x11: Add a precondition

Trying to be helpful.
This commit is contained in:
Matthias Clasen 2022-09-09 14:50:08 -04:00
parent 1c375f72bc
commit 9baae419f6

View File

@ -5641,6 +5641,8 @@ gdk_x11_get_server_time (GdkWindow *window)
XID
gdk_x11_window_get_xid (GdkWindow *window)
{
g_return_val_if_fail (GDK_IS_X11_WINDOW (window), None);
/* Try to ensure the window has a native window */
if (!_gdk_window_has_impl (window))
{