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
1 changed files with 1 additions and 1 deletions

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