From a877aeb1833a76c0c38a4a5da3920f539a5f4d98 Mon Sep 17 00:00:00 2001 From: Edwin Lee Date: Thu, 3 Oct 2024 10:08:01 -0500 Subject: [PATCH] Allow null mat but check before accessing it --- src/EnergyPlus/MoistureBalanceEMPDManager.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EnergyPlus/MoistureBalanceEMPDManager.cc b/src/EnergyPlus/MoistureBalanceEMPDManager.cc index 92a145ce920..f3cc5f01728 100644 --- a/src/EnergyPlus/MoistureBalanceEMPDManager.cc +++ b/src/EnergyPlus/MoistureBalanceEMPDManager.cc @@ -249,9 +249,9 @@ void GetMoistureBalanceEMPDInput(EnergyPlusData &state) auto const &constr = state.dataConstruction->Construct(surf.Construction); auto const *mat = dynamic_cast(s_mat->materials(constr.LayerPoint(constr.TotLayers))); - assert(mat != nullptr); + // assert(mat != nullptr); - if (mat->mu > 0.0 && surf.Zone > 0) { + if (mat && mat->mu > 0.0 && surf.Zone > 0) { EMPDzone(surf.Zone) = true; } else { ++state.dataMoistureBalEMPD->ErrCount;