diff --git a/libs/flake/KoShapeRegistry.cpp b/libs/flake/KoShapeRegistry.cpp --- a/libs/flake/KoShapeRegistry.cpp +++ b/libs/flake/KoShapeRegistry.cpp @@ -183,15 +183,17 @@ if (n.isElement()) { debugFlake << "trying for element " << n.toElement().tagName(); shape = d->createShapeInternal(e, context, n.toElement()); - break; + if (shape) + break; } } if (shape) debugFlake << "Found a shape for draw:object"; else debugFlake << "Found NO shape shape for draw:object"; } - else { + + if (!shape) { // If not draw:object, e.g draw:image or draw:plugin shape = d->createShapeInternal(e, context, element); }