diff --git a/GUI/View/Realspace/RealspaceBuilder.cpp b/GUI/View/Realspace/RealspaceBuilder.cpp index bb9c8d5be7fba3d9557e193b85e0d71cb1facf94..8ddc92b0a0e4e4d004efdc65691038519de90548 100644 --- a/GUI/View/Realspace/RealspaceBuilder.cpp +++ b/GUI/View/Realspace/RealspaceBuilder.cpp @@ -105,6 +105,9 @@ std::unique_ptr<const double2d_t> layerRoughnessMap(const LayerItem& layerItem, autocorrelation = std::make_unique<K_CorrelationModel>( br->sigma().dVal(), br->hurst().dVal(), br->lateralCorrelationLength().dVal()); + if (!autocorrelation) + return result; + auto roughness = LayerRoughness(autocorrelation.get(), interlayer.get()); if (roughness.sigma() == 0) return result;