mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-02 16:57:04 +00:00
protected popScreen crashing from multiple exit
This commit is contained in:
parent
101707e2ad
commit
ba1708fddd
2
hyper.h
2
hyper.h
@ -1199,7 +1199,7 @@ extern vector<radarline> radarlines;
|
||||
extern vector< function<void()> > screens;
|
||||
|
||||
template<class T> void pushScreen(const T& x) { screens.push_back(x); }
|
||||
inline void popScreen() { screens.pop_back(); }
|
||||
inline void popScreen() { if(isize(screens)>1) screens.pop_back(); }
|
||||
inline void popScreenAll() { while(isize(screens)>1) popScreen(); }
|
||||
|
||||
struct display_data {
|
||||
|
Loading…
x
Reference in New Issue
Block a user