mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Fix segmentation fault on exporting picture depths
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									d47191a3a6
								
							
						
					
					
						commit
						f70a83667b
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -320,7 +320,7 @@ void DiveLogExportDialog::export_depths(const char *filename, const bool selecte
 | 
				
			||||||
	struct dive *dive;
 | 
						struct dive *dive;
 | 
				
			||||||
	depth_t depth;
 | 
						depth_t depth;
 | 
				
			||||||
	int i;
 | 
						int i;
 | 
				
			||||||
	const char **unit = NULL;
 | 
						const char *unit = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct membuffer buf = { 0 };
 | 
						struct membuffer buf = { 0 };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -336,7 +336,7 @@ void DiveLogExportDialog::export_depths(const char *filename, const bool selecte
 | 
				
			||||||
				depth.mm = s->depth.mm;
 | 
									depth.mm = s->depth.mm;
 | 
				
			||||||
				s++;
 | 
									s++;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			put_format(&buf, "%s\t%.1f%s\n", picture->filename, get_depth_units(depth.mm, NULL, unit), *unit);
 | 
								put_format(&buf, "%s\t%.1f%s\n", picture->filename, get_depth_units(depth.mm, NULL, &unit), unit);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue