summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kurator/src/Campaign.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kurator/src/Campaign.cpp b/kurator/src/Campaign.cpp
index c0e28f1..be02862 100644
--- a/kurator/src/Campaign.cpp
+++ b/kurator/src/Campaign.cpp
@@ -52,6 +52,8 @@ Campaign::Campaign(std::shared_ptr<Session> _session) :
void
Campaign::update(const float)
{
+ if (ships.empty())
+ return session->pop();
if (ImGui::Begin("Campaign")) {
ImGui::Text("Level %d, ships left:", level);
for (const auto& ship : ships) {
@@ -76,8 +78,6 @@ Campaign::update(const float)
session->pop();
}
ImGui::End();
- if (ships.empty())
- session->pop();
}