fix: fix polygon double click CtrlPoint crash bug

This commit is contained in:
kradchen
2025-06-30 13:20:05 +08:00
parent 27857d4263
commit d1e8ea7109

View File

@@ -176,6 +176,7 @@ void OpenPolyAnnotationActor::UpdatePerimeterAndAreaText()
{ {
if (text) if (text)
{ {
if (renderPoints->GetNumberOfPoints()<1) return;
double *rp = renderPoints->GetPoint(0); double *rp = renderPoints->GetPoint(0);
text->SetDisplayPosition(rp[0] + 10, rp[1] - 20); text->SetDisplayPosition(rp[0] + 10, rp[1] - 20);
double distance = 0.0; double distance = 0.0;