Emit warning: ScreenStack tries to pop when empty

This commit is contained in:
Stephen Seo 2023-07-31 20:45:16 +09:00
parent 7a4c8ea0f5
commit a0dbf2b172

View file

@ -68,6 +68,11 @@ void ScreenStack::handle_pending_actions() {
if (!stack.empty()) {
stack.pop_back();
}
#ifndef NDEBUG
else {
std::cerr << "WARNING: Tried to pop screen when stack was empty!\n";
}
#endif // NDEBUG
break;
case Action::NOP:
// Intentionally left blank.