fix nullptr access in curve edit

This commit is contained in:
gagarinlg
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent c13d2ed60d
commit 4af17b49c8
+4
View File
@@ -193,9 +193,11 @@ class CurveEditWindow : public Page
} }
SET_DIRTY(); SET_DIRTY();
curveEdit->updatePreview(); curveEdit->updatePreview();
if(curveDataEdit) {
curveDataEdit->clear(); curveDataEdit->clear();
curveDataEdit->update(); curveDataEdit->update();
} }
}
}); });
// Points count // Points count
@@ -217,9 +219,11 @@ class CurveEditWindow : public Page
curve.points = newValue; curve.points = newValue;
SET_DIRTY(); SET_DIRTY();
curveEdit->updatePreview(); curveEdit->updatePreview();
if(curveDataEdit) {
curveDataEdit->clear(); curveDataEdit->clear();
curveDataEdit->update(); curveDataEdit->update();
} }
}
}); });
edit->setSuffix(STR_PTS); edit->setSuffix(STR_PTS);
grid.nextLine(); grid.nextLine();