Fixed Crash when pressing stop when not in play mode

This commit is contained in:
Antoine Pilote
2023-07-20 20:38:16 -04:00
parent 8296aa6e43
commit f186c3780e

View File

@@ -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();