From 52c5033edb39aa71c2a979b4788b622dc44683af Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 1 Mar 2018 09:27:55 +0100 Subject: [PATCH] Properly take the Lua lock when processing menu callbacks. --- theme.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/theme.cpp b/theme.cpp index 7240cd4..8b2f6b6 100644 --- a/theme.cpp +++ b/theme.cpp @@ -1458,6 +1458,7 @@ int Theme::set_theme_menu(lua_State *L) void Theme::theme_menu_entry_clicked(int lua_ref) { + unique_lock lock(m); lua_rawgeti(L, LUA_REGISTRYINDEX, lua_ref); if (lua_pcall(L, 0, 0, 0) != 0) { fprintf(stderr, "error running menu callback: %s\n", lua_tostring(L, -1)); -- 2.39.2