Commit 43929f15 authored by Claudio Valerio's avatar Claudio Valerio

fixed issue with delete

parent ddaed833
......@@ -1017,10 +1017,9 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
mScene->setModified(false);
}
if (annotationGroup)
{
if (annotationGroup->polygons().empty())
if (annotationGroup && annotationGroup->polygons().empty()){
delete annotationGroup;
annotationGroup = 0;
}
mScene->enableUndoRedoStack();
......@@ -2812,6 +2811,7 @@ UBGraphicsTextItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::textItemFromSvg()
if (mXmlReader.hasError())
{
delete textItem;
textItem = 0;
return 0;
}
......
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