Commit afab21fb authored by Jan Möbius's avatar Jan Möbius
Browse files

Only delete objectRoot if it exists

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7805 383ad7c9-94d9-4d36-a494-682f7c89f535
parent adf802cf
......@@ -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 )
......
Supports Markdown
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