mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Make sure that the planned dive is selected
With the changes to the selection logic the selected_dive variable didn't get updated at the end of planning a dive. With an empty dive list that could cause selected_dive to be -1 which would subsequently cause a SIGSEGV when trying to edit the newly created dive. With this commit we use the shared go_to_iter() function and also make sure that selected_dive is set correctly. Reported-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b93f2ec6c3
commit
de7d5b2d5b
2 changed files with 17 additions and 17 deletions
3
info.c
3
info.c
|
|
@ -906,7 +906,8 @@ int edit_multi_dive_info(struct dive *single_dive)
|
|||
master = single_dive;
|
||||
if (!master)
|
||||
master = current_dive;
|
||||
|
||||
if (!master)
|
||||
return 0;
|
||||
/* See if we should use multi dive mode */
|
||||
multi = FALSE;
|
||||
if (!single_dive) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue