Fix a couple of small problems in add weightsystem

The constructor letf the currentWeightsytem variable uninitialized.
Instead of creating the memory leak by malloc-ing the newWeightsystem in
the on_addWeight_clicked() function use a local variable instead and pass
its address around.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-05-01 16:23:20 -07:00
parent f45618f0c7
commit 00d8531382
2 changed files with 6 additions and 5 deletions

View file

@ -14,6 +14,7 @@
AddWeightsystemDialog::AddWeightsystemDialog(QWidget *parent) : ui(new Ui::AddWeightsystemDialog())
{
ui->setupUi(this);
currentWeightsystem = NULL;
}
void AddWeightsystemDialog::setWeightsystem(weightsystem_t *ws)