diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-01-04 17:48:34 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-01-04 17:55:37 -0800 |
commit | 3bfa8de2f7022370f6ab497a378be51018b49f35 (patch) | |
tree | 6d8373300f8a3efa4343916caaad500d6a7d9501 /subsurface-core/dive.h | |
parent | 72ce77a5ee5127c374a56d3de741b808432b6ce5 (diff) | |
download | subsurface-3bfa8de2f7022370f6ab497a378be51018b49f35.tar.gz |
Cloud storage: fix potential crash when avoiding reloading dive list
If we loaded the dive list from cache and then try to figure out if the remote
repository had anything different, we were being super stupid if the SHA was
identical... we had already cleared the dive list by the time we decided that
we didn't need to load things. Granted, the model was still populated (oops),
but the backend data structure was cleared and accesses to it (e.g., when
drawing the profile) would cause things to crash.
The helper function duplicates some code, but trying to not duplicate the code
made things even harder to read.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/dive.h')
-rw-r--r-- | subsurface-core/dive.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/subsurface-core/dive.h b/subsurface-core/dive.h index ff7dbd2be..e96806d23 100644 --- a/subsurface-core/dive.h +++ b/subsurface-core/dive.h @@ -660,6 +660,7 @@ extern int parse_cobalt_buffer(sqlite3 *handle, const char *url, const char *buf extern int parse_divinglog_buffer(sqlite3 *handle, const char *url, const char *buf, int size, struct dive_table *table); extern int parse_dlf_buffer(unsigned char *buffer, size_t size); +extern int check_git_sha(const char *filename); extern int parse_file(const char *filename); extern int parse_csv_file(const char *filename, char **params, int pnr, const char *csvtemplate); extern int parse_seabear_csv_file(const char *filename, char **params, int pnr, const char *csvtemplate); |