From bad113588cff87e8505745a4cc1c57b4d3745adb Mon Sep 17 00:00:00 2001 From: Daniel Evans Date: Fri, 27 Dec 2013 21:58:27 +0000 Subject: [PATCH] Fix crash on exiting last state --- viewer/State.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/viewer/State.hpp b/viewer/State.hpp index ff523e15..5bd660b1 100644 --- a/viewer/State.hpp +++ b/viewer/State.hpp @@ -100,7 +100,7 @@ struct StateManager // TODO: Resole states being leaked. states.back()->exit(); states.pop_back(); - if(states.back()) { + if(states.size() > 0) { states.back()->enter(); } }