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; | ||||
| 
 | ||||
| 	AddCylinderDialog dialog(this); | ||||
| 	cylinder_t *newCylinder = (cylinder_t*) malloc(sizeof(cylinder_t)); | ||||
| 	newCylinder->type.description = ""; | ||||
| 	cylinder_t newCylinder; | ||||
| 	newCylinder.type.description = ""; | ||||
| 
 | ||||
| 	dialog.setCylinder(newCylinder); | ||||
| 	dialog.setCylinder(&newCylinder); | ||||
| 	int result = dialog.exec(); | ||||
| 	if (result == QDialog::Rejected) { | ||||
| 		return; | ||||
| 	} | ||||
| 
 | ||||
| 	dialog.updateCylinder(); | ||||
| 	cylindersModel->add(newCylinder); | ||||
| 	cylindersModel->add(&newCylinder); | ||||
| } | ||||
| 
 | ||||
| void MainTab::on_editCylinder_clicked() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue