1
0
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:
Zeno Rogue 2019-11-30 15:05:58 +01:00
parent ca40458f44
commit aef7e7ef37

View File

@ -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 #if HDR
template<class T> auto in_underlying_geometry(const T& f) -> decltype(f()) { template<class T> auto in_underlying_geometry(const T& f) -> decltype(f()) {