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() : ...@@ -121,6 +121,7 @@ Core() :
QObject(), QObject(),
capture_(false), capture_(false),
nextBackupId_(0), nextBackupId_(0),
objectRoot_(0),
coreWidget_(0) coreWidget_(0)
{ {
...@@ -586,8 +587,11 @@ Core::~Core() ...@@ -586,8 +587,11 @@ Core::~Core()
QMetaObject::invokeMethod(plugins[i].plugin, "exit", Qt::DirectConnection); QMetaObject::invokeMethod(plugins[i].plugin, "exit", Qt::DirectConnection);
} }
objectRoot_->deleteSubtree(); // Delete the objectRoot if it was constructed
delete objectRoot_; if ( objectRoot_ != 0 ) {
objectRoot_->deleteSubtree();
delete objectRoot_;
}
// Clean up loggers // Clean up loggers
for ( uint i = 0 ; i < loggers_.size(); ++i ) 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