mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fixed memory leak
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
be31a53b0d
commit
e7b84233af
1 changed files with 4 additions and 4 deletions
|
@ -246,17 +246,17 @@ void MainTab::on_addCylinder_clicked()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
AddCylinderDialog dialog(this);
|
AddCylinderDialog dialog(this);
|
||||||
cylinder_t *newCylinder = (cylinder_t*) malloc(sizeof(cylinder_t));
|
cylinder_t newCylinder;
|
||||||
newCylinder->type.description = "";
|
newCylinder.type.description = "";
|
||||||
|
|
||||||
dialog.setCylinder(newCylinder);
|
dialog.setCylinder(&newCylinder);
|
||||||
int result = dialog.exec();
|
int result = dialog.exec();
|
||||||
if (result == QDialog::Rejected) {
|
if (result == QDialog::Rejected) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.updateCylinder();
|
dialog.updateCylinder();
|
||||||
cylindersModel->add(newCylinder);
|
cylindersModel->add(&newCylinder);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainTab::on_editCylinder_clicked()
|
void MainTab::on_editCylinder_clicked()
|
||||||
|
|
Loading…
Add table
Reference in a new issue