diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-05-01 16:23:20 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-01 16:23:20 -0700 |
commit | 00d85313827af88ae5f35b2391ffa6964e81da49 (patch) | |
tree | 73c98ea98344f204857f07bf2fdc2e8baa1de90b /qt-ui/addweightsystemdialog.cpp | |
parent | f45618f0c7ce5af85e0f69aab49ef20a1663bca1 (diff) | |
download | subsurface-00d85313827af88ae5f35b2391ffa6964e81da49.tar.gz |
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>
Diffstat (limited to 'qt-ui/addweightsystemdialog.cpp')
-rw-r--r-- | qt-ui/addweightsystemdialog.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/addweightsystemdialog.cpp b/qt-ui/addweightsystemdialog.cpp index 6ac1c02f9..48a399de9 100644 --- a/qt-ui/addweightsystemdialog.cpp +++ b/qt-ui/addweightsystemdialog.cpp @@ -14,6 +14,7 @@ AddWeightsystemDialog::AddWeightsystemDialog(QWidget *parent) : ui(new Ui::AddWeightsystemDialog()) { ui->setupUi(this); + currentWeightsystem = NULL; } void AddWeightsystemDialog::setWeightsystem(weightsystem_t *ws) |