fix: 曲线通道重建截面时防崩溃 #34

Merged
gjm merged 1 commits from company-desktop-computer/fix/ewpipebase-curve-read-guard AGit into main 2026-10-22 10:26:59 +08:00
Showing only changes of commit 4fc910d6fd - Show all commits
@@ -771,17 +771,19 @@ AcDbRegion *AecDbEwPipeBase::RegionFromCurvesDwgInFields(AcDbDwgFiler *pFiler, A
arRegPtrs.removeAt(nPos); arRegPtrs.removeAt(nPos);
} }
Acad::ErrorStatus es;
for (int j = 0;j < arRegPtrs.length();j++) for (int j = 0;j < arRegPtrs.length();j++)
{ {
pRegion = (AcDbRegion*)arRegPtrs.at(j); pRegion = (AcDbRegion*)arRegPtrs.at(j);
if (isRegionNull(pRegion) && isRegionNull(pRegionBig)) // 任一 region 无效就跳过,无效 region 参与布尔运算可能让 ACIS 崩溃
if (isRegionNull(pRegion) || isRegionNull(pRegionBig))
{ {
delete pRegion;
continue; continue;
} }
es = pRegionBig->booleanOper(AcDb::kBoolSubtract, pRegion); rawBooleanOperWrapper(pRegionBig, pRegion, AcDb::kBoolSubtract);
delete pRegion;
} }
return pRegionBig; return pRegionBig;
} }