mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Fixed memory leak in is_splittable_object()
This commit is contained in:
		
							parent
							
								
									8cea821c6a
								
							
						
					
					
						commit
						c5e56911f4
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -1451,12 +1451,12 @@ bool is_splittable_object(const bool split_part)
 | 
			
		|||
        return false;
 | 
			
		||||
 | 
			
		||||
    TriangleMeshPtrs meshptrs = volume->mesh.split();
 | 
			
		||||
    if (meshptrs.size() <= 1) {
 | 
			
		||||
        delete meshptrs.front();
 | 
			
		||||
        return false;
 | 
			
		||||
    bool splittable = meshptrs.size() > 1;
 | 
			
		||||
    for (TriangleMesh* m : meshptrs)
 | 
			
		||||
    {
 | 
			
		||||
        delete m;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return true;
 | 
			
		||||
    return splittable;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void on_btn_split(const bool split_part)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue