summaryrefslogtreecommitdiff
path: root/onlineupdate
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2022-11-07 14:29:09 +0100
committerAndras Timar <andras.timar@collabora.com>2023-01-23 20:01:52 +0100
commit01a26c0ab64606fafd58d514d3c2551714745536 (patch)
tree9c1af7a4cc4f3876b67457be400f93fc1393462c /onlineupdate
parent4c0b545442c312d6ca7a669a762ed09a35b7556d (diff)
NSS initialization guard
Change-Id: I61a5886d0d13eaef6a61479e35d52a85937075ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142385 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'onlineupdate')
-rw-r--r--onlineupdate/source/update/updater/updater.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/onlineupdate/source/update/updater/updater.cxx b/onlineupdate/source/update/updater/updater.cxx
index 54750afb4218..467f0b67cd1f 100644
--- a/onlineupdate/source/update/updater/updater.cxx
+++ b/onlineupdate/source/update/updater/updater.cxx
@@ -2919,12 +2919,15 @@ int NS_main(int argc, NS_tchar **argv)
// need to initialize NSS at all there.
// Otherwise, minimize the amount of NSS we depend on by avoiding all the NSS
// databases.
- if (NSS_NoDB_Init(NULL) != SECSuccess)
+ if (!NSS_IsInitialized())
{
- PRErrorCode error = PR_GetError();
- fprintf(stderr, "Could not initialize NSS: %s (%d)",
- PR_ErrorToName(error), (int) error);
- _exit(1);
+ if (NSS_NoDB_Init(NULL) != SECSuccess)
+ {
+ PRErrorCode error = PR_GetError();
+ fprintf(stderr, "Could not initialize NSS: %s (%d)",
+ PR_ErrorToName(error), (int) error);
+ _exit(1);
+ }
}
#endif