diff --git a/Source/API/lib3mf_levelset.cpp b/Source/API/lib3mf_levelset.cpp index 61d276853..d26521846 100644 --- a/Source/API/lib3mf_levelset.cpp +++ b/Source/API/lib3mf_levelset.cpp @@ -235,7 +235,9 @@ bool CLevelSet::IsLevelSetObject() IVolumeData * CLevelSet::GetVolumeData() { NMR::PModelVolumeData pVolumeData = levelSetObject()->getVolumeData(); - if (pVolumeData == nullptr) - throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDOBJECT); + if (!pVolumeData) + { + return nullptr; + } return new CVolumeData(pVolumeData); } \ No newline at end of file