diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index e0be0b916..d6e4f6e63 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -1258,10 +1258,9 @@ void TMainWindow::ImportFromPattern() converter.Convert(); VDomDocument::ValidateXML(VPatternConverter::CurrentSchema, mPath); - VLitePattern *doc = new VLitePattern(); + QScopedPointer doc(new VLitePattern()); doc->setXMLContent(mPath); measurements = doc->ListMeasurements(); - delete doc; // close a pattern } catch (VException &e) {