mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Make sure the model is non-NULL before comparing with it
In commit 194a05b18911 "Correct the detection of existing dives in the Uemis downloader" I forgot to add that check before calling strcmp. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									e862f7c343
								
							
						
					
					
						commit
						7aaa539afe
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -733,7 +733,7 @@ static char *get_divenr(char *deviceidstr)
 | 
				
			||||||
	for (i = 0; i < dive_table.nr; i++) {
 | 
						for (i = 0; i < dive_table.nr; i++) {
 | 
				
			||||||
		struct divecomputer *dc = &dive_table.dives[i]->dc;
 | 
							struct divecomputer *dc = &dive_table.dives[i]->dc;
 | 
				
			||||||
		while (dc) {
 | 
							while (dc) {
 | 
				
			||||||
			if (!strcmp(dc->model, "Uemis Zurich") &&
 | 
								if (dc->model && !strcmp(dc->model, "Uemis Zurich") &&
 | 
				
			||||||
			    dc->deviceid == deviceid && dc->diveid > maxdiveid)
 | 
								    dc->deviceid == deviceid && dc->diveid > maxdiveid)
 | 
				
			||||||
				maxdiveid = dc->diveid;
 | 
									maxdiveid = dc->diveid;
 | 
				
			||||||
			dc = dc->next;
 | 
								dc = dc->next;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue