diff --git a/platform/x11/joystick_linux.cpp b/platform/x11/joystick_linux.cpp index 0615f33f965..2793cc57346 100644 --- a/platform/x11/joystick_linux.cpp +++ b/platform/x11/joystick_linux.cpp @@ -89,6 +89,8 @@ joystick_linux::joystick_linux(InputDefault *in) joystick_linux::~joystick_linux() { exit_udev = true; Thread::wait_to_finish(joy_thread); + memdelete(joy_thread); + memdelete(joy_mutex); close_joystick(); }