mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-29 16:32:53 +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;
|
extern vector< function<void()> > screens;
|
||||||
|
|
||||||
template<class T> void pushScreen(const T& x) { screens.push_back(x); }
|
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(); }
|
inline void popScreenAll() { while(isize(screens)>1) popScreen(); }
|
||||||
|
|
||||||
struct display_data {
|
struct display_data {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user