mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
git save: fix crash with no remote
Commit e21cae2d46
("Cloud storage: sync the remote after save") broke
regular git saving without any remotes: it would never initialize the
"remote" pointer, and then use that uninitialized remote pointer to see
if it was a cloud storage remote that it should try to sync.
Fix it.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
eca7d998e1
commit
eff3fd3261
2 changed files with 3 additions and 1 deletions
|
@ -568,6 +568,8 @@ struct git_repository *is_git_repository(const char *filename, const char **bran
|
|||
free(branch);
|
||||
return dummy_git_repository;
|
||||
}
|
||||
if (remote)
|
||||
*remote = NULL;
|
||||
*branchp = branch;
|
||||
return repo;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue