Commit abd1ec42 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix resource leak

Variable anchor going out of scope leaks the storage it points to
if anchor->anchorType() == KoShapeAnchor::AnchorPage.

parent f006b593
......@@ -1480,6 +1480,7 @@ KoShape *KoTextLoader::loadShape(const KoXmlElement &element, QTextCursor &curso
// page anchored shapes are handled differently
if (anchor->anchorType() == KoShapeAnchor::AnchorPage) {
// nothing else to do
delete anchor;
} else if (anchor->anchorType() == KoShapeAnchor::AnchorAsCharacter) {
KoAnchorInlineObject *anchorObject = new KoAnchorInlineObject(anchor);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment