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

fixed issue with delete

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