From f186c3780ecf02e5373d1a1f1bf672db3678653d Mon Sep 17 00:00:00 2001 From: Antoine Pilote Date: Thu, 20 Jul 2023 20:38:16 -0400 Subject: [PATCH] Fixed Crash when pressing stop when not in play mode --- Editor/src/Windows/EditorInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Editor/src/Windows/EditorInterface.cpp b/Editor/src/Windows/EditorInterface.cpp index e174f19b..81af2da4 100644 --- a/Editor/src/Windows/EditorInterface.cpp +++ b/Editor/src/Windows/EditorInterface.cpp @@ -103,7 +103,7 @@ namespace Nuake { ImGui::SameLine(); - if (ImGui::Button(ICON_FA_STOP, ImVec2(30, 30)) || Input::IsKeyPressed(GLFW_KEY_F8)) + if ((ImGui::Button(ICON_FA_STOP, ImVec2(30, 30)) || Input::IsKeyPressed(GLFW_KEY_F8)) && Engine::IsPlayMode()) { Engine::ExitPlayMode();