Fix possible memory leak.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2017-01-21 15:50:17 +02:00
parent 24d5aa0f53
commit e15d4d9c05

View File

@ -1258,10 +1258,9 @@ void TMainWindow::ImportFromPattern()
converter.Convert();
VDomDocument::ValidateXML(VPatternConverter::CurrentSchema, mPath);
VLitePattern *doc = new VLitePattern();
QScopedPointer<VLitePattern> doc(new VLitePattern());
doc->setXMLContent(mPath);
measurements = doc->ListMeasurements();
delete doc; // close a pattern
}
catch (VException &e)
{