diff --git a/include/lsExpand.hpp b/include/lsExpand.hpp index a47274f2..cfd95c5d 100644 --- a/include/lsExpand.hpp +++ b/include/lsExpand.hpp @@ -40,18 +40,18 @@ template class lsExpand { /// Apply the expansion to the specified width void apply() { - if (width <= levelSet->getLevelSetWidth()) - return; - if (levelSet == nullptr) { lsMessage::getInstance() .addWarning("No level set passed to lsExpand. Not expanding.") .print(); + return; } - if (levelSet->getNumberOfPoints() == 0) { + if (width <= levelSet->getLevelSetWidth()) + return; + + if (levelSet->getNumberOfPoints() == 0) return; - } const T totalLimit = width * 0.5; const int startWidth = levelSet->getLevelSetWidth();