mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
fixed potential crash in get_umap
This commit is contained in:
parent
ca40458f44
commit
aef7e7ef37
@ -1115,7 +1115,7 @@ EX namespace hybrid {
|
||||
}
|
||||
}
|
||||
|
||||
EX hrmap* get_umap() { return ((hrmap_hybrid*)currentmap)->underlying_map; }
|
||||
EX hrmap* get_umap() { if(!dynamic_cast<hrmap_hybrid*>(currentmap)) return nullptr; else return ((hrmap_hybrid*)currentmap)->underlying_map; }
|
||||
|
||||
#if HDR
|
||||
template<class T> auto in_underlying_geometry(const T& f) -> decltype(f()) {
|
||||
|
Loading…
Reference in New Issue
Block a user