diff --git a/nonisotropic.cpp b/nonisotropic.cpp index 18b85c2c..7add7010 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -1115,7 +1115,7 @@ EX namespace hybrid { } } - EX hrmap* get_umap() { return ((hrmap_hybrid*)currentmap)->underlying_map; } + EX hrmap* get_umap() { if(!dynamic_cast(currentmap)) return nullptr; else return ((hrmap_hybrid*)currentmap)->underlying_map; } #if HDR template auto in_underlying_geometry(const T& f) -> decltype(f()) {