From 67bbf20addc44b4c277ed2d5d63f0d727d833716 Mon Sep 17 00:00:00 2001 From: Omar Rashwan Date: Sat, 3 Feb 2024 16:32:05 -0500 Subject: [PATCH] Null check SDL_DBusContext pointer --- src/video/wayland/SDL_waylandvideo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c index 2a201c911..d443d05f7 100644 --- a/src/video/wayland/SDL_waylandvideo.c +++ b/src/video/wayland/SDL_waylandvideo.c @@ -101,6 +101,9 @@ static SDL_bool Wayland_GetGNOMEPrimaryDisplayCoordinates(int *x, int *y) { #ifdef SDL_USE_LIBDBUS SDL_DBusContext *dbus = SDL_DBus_GetContext(); + if (dbus == NULL) { + return SDL_FALSE; + } DBusMessage *reply = NULL; DBusMessageIter iter[3]; DBusMessage *msg = dbus->message_new_method_call(DISPLAY_INFO_NODE,