Commit 608b639e authored by Jan Möbius's avatar Jan Möbius

Fixed uninitialized variable

parent 8f5f2d2e
...@@ -48,22 +48,29 @@ ...@@ -48,22 +48,29 @@
PluginAlignMeshes::PluginAlignMeshes() : PluginAlignMeshes::PluginAlignMeshes() :
toolBox_(0) { toolBox_(0),
toolIcon_(0)
{
} }
PluginAlignMeshes::~PluginAlignMeshes() { PluginAlignMeshes::~PluginAlignMeshes() {
delete toolIcon_; if ( OpenFlipper::Options::gui()) {
delete toolBox_;
delete toolIcon_;
}
} }
void PluginAlignMeshes::initializePlugin() { void PluginAlignMeshes::initializePlugin() {
toolBox_ = new AlignMeshesToolbox(); if ( OpenFlipper::Options::gui()) {
toolBox_ = new AlignMeshesToolbox();
toolIcon_ = new QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"alignMeshes.png"); toolIcon_ = new QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"alignMeshes.png");
emit addToolbox("Align Meshes", toolBox_, toolIcon_); emit addToolbox("Align Meshes", toolBox_, toolIcon_);
connect(toolBox_->alignMeshesButton, SIGNAL(pressed()), SLOT(alignMeshes())); connect(toolBox_->alignMeshesButton, SIGNAL(pressed()), SLOT(alignMeshes()));
}
} }
void PluginAlignMeshes::alignMeshes() { void PluginAlignMeshes::alignMeshes() {
......
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