Commit 8fcf6c34 authored by Jan Möbius's avatar Jan Möbius

Only delete objectRoot if it exists

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7805 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 50f8f292
......@@ -121,6 +121,7 @@ Core() :
QObject(),
capture_(false),
nextBackupId_(0),
objectRoot_(0),
coreWidget_(0)
{
......@@ -586,8 +587,11 @@ Core::~Core()
QMetaObject::invokeMethod(plugins[i].plugin, "exit", Qt::DirectConnection);
}
objectRoot_->deleteSubtree();
delete objectRoot_;
// Delete the objectRoot if it was constructed
if ( objectRoot_ != 0 ) {
objectRoot_->deleteSubtree();
delete objectRoot_;
}
// Clean up loggers
for ( uint i = 0 ; i < loggers_.size(); ++i )
......
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