x11: Make a call NULL-safe
authorMatthias Clasen <mclasen@redhat.com>
Wed, 4 Jan 2023 21:35:56 +0000 (16:35 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 4 Jan 2023 21:37:31 +0000 (16:37 -0500)
Make it safe to call gdk_x11_app_launch_context_get_startup_notify_id
with a NULL info.

gdk/x11/gdkapplaunchcontext-x11.c

index 4284d182cd135d861f8359524239fb6a7babfbf1..7f004f7dca0b856a406eb4d06e2d8492ddf566ca 100644 (file)
@@ -283,6 +283,9 @@ gdk_x11_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
   GFileInfo *fileinfo;
   GdkAppLaunchContext *ctx;
 
+  if (!info)
+    return NULL;
+
   ctx = GDK_APP_LAUNCH_CONTEXT (context);
 
   display = ctx->display;