diff --git a/platform/x11/joystick_linux.cpp b/platform/x11/joystick_linux.cpp index 9a52c4ff366..0e50d2b2477 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(); }