mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
Null check SDL_DBusContext pointer
This commit is contained in:

committed by
Sam Lantinga

parent
2ad4646a24
commit
67bbf20add
@@ -101,6 +101,9 @@ static SDL_bool Wayland_GetGNOMEPrimaryDisplayCoordinates(int *x, int *y)
|
|||||||
{
|
{
|
||||||
#ifdef SDL_USE_LIBDBUS
|
#ifdef SDL_USE_LIBDBUS
|
||||||
SDL_DBusContext *dbus = SDL_DBus_GetContext();
|
SDL_DBusContext *dbus = SDL_DBus_GetContext();
|
||||||
|
if (dbus == NULL) {
|
||||||
|
return SDL_FALSE;
|
||||||
|
}
|
||||||
DBusMessage *reply = NULL;
|
DBusMessage *reply = NULL;
|
||||||
DBusMessageIter iter[3];
|
DBusMessageIter iter[3];
|
||||||
DBusMessage *msg = dbus->message_new_method_call(DISPLAY_INFO_NODE,
|
DBusMessage *msg = dbus->message_new_method_call(DISPLAY_INFO_NODE,
|
||||||
|
Reference in New Issue
Block a user