Segfault pressing Menu key (was Small bug)

Henrik Brautaset Aronsen subsurface at henrik.synth.no
Tue Jan 29 10:06:59 PST 2013


Great.  I sent a separate signed-off patch for the segfault: [PATCH] Fix 
segfault pressing Menu key

It doesn't enable the menu button, though.

Henrik

Sergey Starosek wrote:
> 2013/1/29 Henrik Brautaset Aronsen<subsurface at henrik.synth.no>:
>> This patch should fix it:
>>
>> diff --git a/divelist.c b/divelist.c
>> index b31c9ac..290baba 100644
>> --- a/divelist.c
>> +++ b/divelist.c
>> @@ -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);
>
> It fixes segfault, thanks. But Menu button does not work while it should.
>
> Sergey
> _______________________________________________
> subsurface mailing list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130129/9d67c918/attachment-0001.html>


More information about the subsurface mailing list