summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-11 18:33:30 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-04-11 11:12:33 -0700
commitf3b817c2d5a539a89cad24e4a527768d8cf59a23 (patch)
tree999ea4b1189cdea3b0ef4bbd49d013c1f09bf38a /core
parent6d187b5f4a3b51043fa3b53b6c73a7e0ec7f0b53 (diff)
downloadsubsurface-f3b817c2d5a539a89cad24e4a527768d8cf59a23.tar.gz
media: invalidate correct dive when removing picture
This fixes a bug: when deleting a picture when multiple dives were selected, possibly the wrong dive was invalidated. Thus, the dive wouldn't have been saved to the git repository. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/dive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/dive.c b/core/dive.c
index df5d7951d..3bba4179c 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -3596,7 +3596,7 @@ bool dive_remove_picture(struct dive *d, const char *filename)
struct picture *temp = (*picture)->next;
free_picture(*picture);
*picture = temp;
- invalidate_dive_cache(current_dive);
+ invalidate_dive_cache(d);
return true;
}
return false;