From 6444405479a5dd4fc3f3ab1a2ded3e39c562e2e0 Mon Sep 17 00:00:00 2001 From: Deve Date: Sun, 27 May 2018 21:35:44 +0200 Subject: [PATCH] Avoid using incorrect action in debug menu --- src/utils/debug.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/debug.cpp b/src/utils/debug.cpp index d02570425..d310a60c0 100644 --- a/src/utils/debug.cpp +++ b/src/utils/debug.cpp @@ -246,6 +246,9 @@ LightNode* findNearestLight() bool handleContextMenuAction(s32 cmd_id) { + if (cmd_id == -1) + return false; + Camera* camera = Camera::getActiveCamera(); unsigned int kart_num = 0; if (camera != NULL && camera->getKart() != NULL) @@ -938,7 +941,7 @@ bool onEvent(const SEvent &event) "libopenglrecorder to enable recording. If you got\n" "SuperTuxKart from your distribution's repositories,\n" "please use the official binaries, or contact your\n" - "distributions's package mantainer.", DEBUG_STOP_RECORDING); + "distributions's package mantainer."); #endif mnu->addItem(L"Change camera target >",-1,true, true);