From 4a9626cb7b98088888587b387d53653a718b6b75 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 21 Jun 2016 22:41:49 +1100 Subject: [PATCH] Don't show the Lua Interpreter outside of debug mode (bug #24699) --- src/gui/dialogs/lua_interpreter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/dialogs/lua_interpreter.cpp b/src/gui/dialogs/lua_interpreter.cpp index f48fa4b06cc3..e7b1f46d9a40 100644 --- a/src/gui/dialogs/lua_interpreter.cpp +++ b/src/gui/dialogs/lua_interpreter.cpp @@ -28,6 +28,7 @@ #include "gui/widgets/window.hpp" #include "desktop/clipboard.hpp" +#include "game_config.hpp" #include "game_errors.hpp" #include "gettext.hpp" #include "resources.hpp" //for help fetching lua kernel pointers @@ -636,6 +637,10 @@ void tlua_interpreter::controller::search(int direction) /** Display a new console, using given video and lua kernel */ void tlua_interpreter::display(CVideo& video, lua_kernel_base * lk) { + if(!game_config::debug) { + return; + } + if (!lk) { ERR_LUA << "Tried to open console with a null lua kernel pointer.\n"; return;