From 5862410083da5da02a8bc29a76e7bb1f4977e331 Mon Sep 17 00:00:00 2001 From: Josiah Date: Wed, 21 Oct 2020 09:27:39 -0500 Subject: Add missing return. --- src/gui/cheatMenu.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/cheatMenu.cpp') diff --git a/src/gui/cheatMenu.cpp b/src/gui/cheatMenu.cpp index 9225414a2..d5e93038c 100644 --- a/src/gui/cheatMenu.cpp +++ b/src/gui/cheatMenu.cpp @@ -84,10 +84,13 @@ void CheatMenu::draw(video::IVideoDriver *driver, bool show_debug) ClientScripting *script{ getScript() }; if (!script || !script->m_cheats_loaded) + return; + // Draw menu header if debug info is not being drawn. if (!show_debug) drawEntry(driver, "Dragonfireclient", 0, 0, false, false, CHEAT_MENU_ENTRY_TYPE_HEAD); + int category_count = 0; for (const auto &menu_item : m_cheat_categories) { bool is_selected = category_count == m_selected_category; -- cgit v1.2.3