Null check SDL_DBusContext pointer

This commit is contained in:
Omar Rashwan authored and Sam Lantinga committed 2024-02-03 14:04:46 -08:00
1 parent 2ad4646a24
commit 67bbf20add
1 file changed
+3
+3
View File
@@ -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,