mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Fix segfault pressing Menu key
Pierre wrote: "On my keyboard I have a key on the right side of the space bar, between the alt+gr key and the right ctrl which most of the time emulates the right mouse click. If I press this button on subsurface, I end up with: Segmentation fault (core dumped) This whatever the selection and nicely always reproducible." This patch doesn't make the key work, but it fixes the segfault. Reported-by: Pierre-Yves Chibon <pingou@pingoured.fr> Debugged-and-acked-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									9b47dc1f59
								
							
						
					
					
						commit
						0fb1fe8c6e
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -2353,7 +2353,7 @@ static void popup_divelist_menu(GtkTreeView *tree_view, GtkTreeModel *model, int
 | 
			
		|||
	int idx, previdx, nextidx;
 | 
			
		||||
	struct dive *dive;
 | 
			
		||||
 | 
			
		||||
	if (!gtk_tree_view_get_path_at_pos(tree_view, event->x, event->y, &path, NULL, NULL, NULL))
 | 
			
		||||
	if (!event || !gtk_tree_view_get_path_at_pos(tree_view, event->x, event->y, &path, NULL, NULL, NULL))
 | 
			
		||||
		return;
 | 
			
		||||
	gtk_tree_model_get_iter(MODEL(dive_list), &iter, path);
 | 
			
		||||
	gtk_tree_model_get(MODEL(dive_list), &iter, DIVE_INDEX, &idx, -1);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue