diff --git a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C
index f1c969762bfae8428589c936d34cb384944e209c..b4fcf6b974a2111b94c4e54cd73a5955832eaa10 100644
--- a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C
+++ b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C
@@ -532,7 +532,7 @@ bool Foam::treeDataPrimitivePatch<PatchType>::findAllIntersectOp::operator()
     point& intersectionPoint
 ) const
 {
-    if (!shapeMask_.empty() && findIndex(shapeMask_, index) != -1)
+    if (findIndex(shapeMask_, index) != -1)
     {
         return false;
     }