mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-27 20:58:47 +00:00
Fix crash with libgit when it's compiled with GIT_THREADS
Call git_threads_init() before using libgit functions. The documentation says: "If libgit2 has been built with GIT_THREADS on, this function must be called once before any other library functions. If libgit2 has been built without GIT_THREADS support, this function is a no-op" Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
02d5d436d2
commit
45767961e8
1 changed files with 2 additions and 0 deletions
2
main.cpp
2
main.cpp
|
@ -11,6 +11,7 @@
|
|||
#include "qt-ui/diveplanner.h"
|
||||
|
||||
#include <QStringList>
|
||||
#include <git2.h>
|
||||
|
||||
QTranslator *qtTranslator, *ssrfTranslator;
|
||||
|
||||
|
@ -41,6 +42,7 @@ int main(int argc, char **argv)
|
|||
files.push_back(a);
|
||||
}
|
||||
}
|
||||
git_threads_init();
|
||||
setup_system_prefs();
|
||||
prefs = default_prefs;
|
||||
fill_profile_color();
|
||||
|
|
Loading…
Reference in a new issue