mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Fix crash when cancelling dive add on empty dive list
Don't pass NULL dives around. Fixes #231 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									e5098c443f
								
							
						
					
					
						commit
						ea2e517e39
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -320,7 +320,8 @@ void CylindersModel::setDive(dive* d) | ||||||
| { | { | ||||||
| 	if (current) | 	if (current) | ||||||
| 		clear(); | 		clear(); | ||||||
| 
 | 	if (!d) | ||||||
|  | 		return; | ||||||
| 	int amount = MAX_CYLINDERS; | 	int amount = MAX_CYLINDERS; | ||||||
| 	for(int i = 0; i < MAX_CYLINDERS; i++) { | 	for(int i = 0; i < MAX_CYLINDERS; i++) { | ||||||
| 		cylinder_t *cylinder = &d->cylinder[i]; | 		cylinder_t *cylinder = &d->cylinder[i]; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue