summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/display/drawing-item.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/display/drawing-item.cpp b/src/display/drawing-item.cpp
index 6777be5cc..757a973fe 100644
--- a/src/display/drawing-item.cpp
+++ b/src/display/drawing-item.cpp
@@ -274,8 +274,8 @@ DrawingItem::setTransform(Geom::Affine const &new_trans)
if (!Geom::are_near(current, new_trans, 1e-18)) {
// mark the area where the object was for redraw.
_markForRendering();
+ delete _transform;
if (new_trans.isIdentity()) {
- delete _transform; // delete NULL; is safe
_transform = nullptr;
} else {
_transform = new Geom::Affine(new_trans);