Commit 0c7e8dbe authored by Matthias Möller's avatar Matthias Möller

fix nullpointer crash when OF is closed

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17072 383ad7c9-94d9-4d36-a494-682f7c89f535
parent dfdb8b68
......@@ -78,25 +78,12 @@ InfoMeshObjectPlugin::InfoMeshObjectPlugin() :
InfoMeshObjectPlugin::~InfoMeshObjectPlugin() {
if ( OpenFlipper::Options::gui()) {
delete infoBar_;
delete info_;
}
//Info bar and dialog will be deleted by core widget
}
void InfoMeshObjectPlugin::initializePlugin() {
if ( OpenFlipper::Options::gui()) {
infoBar_ = new InfoBar();
// Create info dialog
info_ = new InfoDialog();
// Set default pick mode in dialog box
info_->pickMode->setCurrentIndex(0); // PICK_FACES
}
}
/// initialize the plugin
......@@ -106,6 +93,16 @@ void InfoMeshObjectPlugin::pluginsInitialized() {
setDescriptions();
if ( OpenFlipper::Options::gui()) {
// Create info bar
infoBar_ = new InfoBar();
// Create info dialog
info_ = new InfoDialog();
// Set default pick mode in dialog box
info_->pickMode->setCurrentIndex(0); // PICK_FACES
emit addWidgetToStatusbar(infoBar_);
infoBar_->hideCounts();
}
......
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