[Libreoffice-commits] core.git: Branch 'feature/cib_contract57' - sal/osl
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Tue Jan 17 11:27:09 UTC 2017
sal/osl/all/log.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 87fa48aebfe7b6df1e7b7e23e5b5801b751ef231
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Tue Jan 17 12:24:49 2017 +0100
Fix crash when logging.ini does not exist
Change-Id: I1ed82fdcce1eb15548e699ffbf93ae39664612b3
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index e7b2283..42fc5e8 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -162,8 +162,11 @@ char const * getLogFilePath() {
}
std::ofstream * getLogFile() {
- static std::ofstream file(getLogFilePath(), std::ios::app | std::ios::out);
+ static char const * logFilePath = getLogFilePath();
+ if (logFilePath == nullptr)
+ return nullptr;
+ static std::ofstream file(logFilePath, std::ios::app | std::ios::out);
return &file;
}
More information about the Libreoffice-commits
mailing list