From 6a008ae7246a0d1bbf926a94127d678c7a632f75 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 19 Feb 2019 21:21:22 +0100 Subject: [PATCH] x11display: fix threaded crash when using get_keyboard_map() --- panda/src/x11display/x11GraphicsWindow.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index df038a6dad..0aa4e0bf64 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -1976,6 +1976,8 @@ get_keyboard_map() const { // XkbGetMap(_display, XkbAllMapComponentsMask, XkbUseCoreKbd); ButtonMap *map = new ButtonMap; + LightReMutexHolder holder(x11GraphicsPipe::_x_mutex); + for (int k = 9; k <= 135; ++k) { ButtonHandle raw_button = map_raw_button(k); if (raw_button == ButtonHandle::none()) {