1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 03:12:36 +01:00

Fix crash on exiting last state

This commit is contained in:
Daniel Evans 2013-12-27 21:58:27 +00:00
parent 8a7f33e815
commit bad113588c

View File

@ -100,7 +100,7 @@ struct StateManager
// TODO: Resole states being leaked. // TODO: Resole states being leaked.
states.back()->exit(); states.back()->exit();
states.pop_back(); states.pop_back();
if(states.back()) { if(states.size() > 0) {
states.back()->enter(); states.back()->enter();
} }
} }