mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
72ce77a5ee
commit
3bfa8de2f7
3 changed files with 32 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue