Removed unnecessary null pointer checks, closes #5

This commit is contained in:
Jan Käberich 2020-10-01 17:52:42 +02:00
parent 116794e89b
commit 1ea2771e32
4 changed files with 12 additions and 26 deletions

View file

@ -352,9 +352,7 @@ void TraceBodePlot::enableTraceAxis(Trace *t, int axis, bool enabled)
tracesAxis[axis].erase(t);
// clean up and delete
if(curves[axis].find(t) != curves[axis].end()) {
if(curves[axis][t].curve) {
delete curves[axis][t].curve;
}
delete curves[axis][t].curve;
curves[axis].erase(t);
}
int otherAxis = axis == 0 ? 1 : 0;