diff options
Diffstat (limited to 'platform/x11')
-rw-r--r-- | platform/x11/joypad_linux.cpp | 2 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 1 | ||||
-rw-r--r-- | platform/x11/power_x11.cpp | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp index e6328ee14d..4242952374 100644 --- a/platform/x11/joypad_linux.cpp +++ b/platform/x11/joypad_linux.cpp @@ -513,6 +513,8 @@ void JoypadLinux::process_joypads() { break; default: + if (ev.code >= MAX_ABS) + return; if (joy->abs_map[ev.code] != -1 && joy->abs_info[ev.code]) { InputDefault::JoyAxis value = axis_correct(joy->abs_info[ev.code], ev.value); joy->curr_axis[joy->abs_map[ev.code]] = value; diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index 9b35648046..36bf51e7f9 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -788,6 +788,7 @@ void OS_X11::finalize() { memdelete(camera_server); + cursors_cache.clear(); visual_server->finish(); memdelete(visual_server); //memdelete(rasterizer); diff --git a/platform/x11/power_x11.cpp b/platform/x11/power_x11.cpp index 758bd84114..c33c77e16b 100644 --- a/platform/x11/power_x11.cpp +++ b/platform/x11/power_x11.cpp @@ -268,9 +268,7 @@ bool PowerX11::GetPowerInfo_Linux_proc_acpi() { check_proc_acpi_battery(node.utf8().get_data(), &have_battery, &charging /*, seconds, percent*/); node = dirp->get_next(); } - memdelete(dirp); } - dirp->change_dir(proc_acpi_ac_adapter_path); err = dirp->list_dir_begin(); if (err != OK) { @@ -281,7 +279,6 @@ bool PowerX11::GetPowerInfo_Linux_proc_acpi() { check_proc_acpi_ac_adapter(node.utf8().get_data(), &have_ac); node = dirp->get_next(); } - memdelete(dirp); } if (!have_battery) { @@ -294,6 +291,7 @@ bool PowerX11::GetPowerInfo_Linux_proc_acpi() { this->power_state = OS::POWERSTATE_ON_BATTERY; } + memdelete(dirp); return true; /* definitive answer. */ } |