comphelper/source/misc/profilezone.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 45050470408b7c23182e89df7439a0820307f6ca
Author: Tor Lillqvist <[email protected]>
Date:   Wed Aug 23 10:51:55 2017 +0300

    Don't crash if aProfileId is null
    
    Change-Id: I1505469200c4bcc82f07eae325882fd6454ebcc5

diff --git a/comphelper/source/misc/profilezone.cxx 
b/comphelper/source/misc/profilezone.cxx
index e9e9caafca24..dacd098442a9 100644
--- a/comphelper/source/misc/profilezone.cxx
+++ b/comphelper/source/misc/profilezone.cxx
@@ -46,6 +46,8 @@ long long addRecording(const char * aProfileId, long long 
aCreateTime)
         TimeValue systemTime;
         osl_getSystemTime( &systemTime );
         long long aTime = (long long) systemTime.Seconds * 1000000 + 
systemTime.Nanosec/1000;
+        if (!aProfileId)
+            aProfileId = "(null)";
         OUString aString(aProfileId, strlen(aProfileId), 
RTL_TEXTENCODING_UTF8);
         g_aRecording.push_back(
             OUString::number(osl_getThreadIdentifier(nullptr)) + " " +
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to