diff options
Diffstat (limited to 'desktop/source/app/crashreport.cxx')
-rw-r--r-- | desktop/source/app/crashreport.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/desktop/source/app/crashreport.cxx b/desktop/source/app/crashreport.cxx index 379dfa38defd..c90a584a4163 100644 --- a/desktop/source/app/crashreport.cxx +++ b/desktop/source/app/crashreport.cxx @@ -231,15 +231,21 @@ void CrashReporter::removeExceptionHandler() bool CrashReporter::IsDumpEnable() { + static bool bConfigRead = false; + static bool bEnable = true; // default, always on + + if (bConfigRead) + return bEnable; + OUString sToken; OString sEnvVar(std::getenv("CRASH_DUMP_ENABLE")); - bool bEnable = true; // default, always on // read configuration item 'CrashDumpEnable' -> bool on/off if (rtl::Bootstrap::get("CrashDumpEnable", sToken) && sEnvVar.isEmpty()) { bEnable = sToken.toBoolean(); } + bConfigRead = true; return bEnable; } |