mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-18 17:57:55 +08:00
Fix tray menu pointer check
This commit is contained in:
committed by
Sam Lantinga
parent
eba3c7ae0a
commit
ad19bafd12
@@ -88,8 +88,6 @@ static DBusHandlerResult TrayHandleGetAllProps(SDL_Tray *tray, SDL_TrayDBus *tra
|
||||
dbus_uint32_t uint32_val;
|
||||
dbus_bool_t bool_value;
|
||||
|
||||
menu_dbus = tray->menu ? (SDL_TrayMenuDBus *)tray->menu->internal : NULL;
|
||||
|
||||
empty = "";
|
||||
driver->dbus->message_iter_init(msg, &iter);
|
||||
driver->dbus->message_iter_get_basic(&iter, &interface);
|
||||
@@ -150,7 +148,7 @@ static DBusHandlerResult TrayHandleGetAllProps(SDL_Tray *tray, SDL_TrayDBus *tra
|
||||
driver->dbus->message_iter_close_container(&dict_iter, &entry_iter);
|
||||
|
||||
key = "ItemIsMenu";
|
||||
menu_dbus = (SDL_TrayMenuDBus *)tray->menu->internal;
|
||||
menu_dbus = tray->menu ? (SDL_TrayMenuDBus *)tray->menu->internal : NULL;
|
||||
if (menu_dbus && menu_dbus->menu_path) {
|
||||
bool_value = TRUE;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user