[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 2 commits - include/comphelper
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 11 22:15:42 UTC 2019
include/comphelper/windowsdebugoutput.hxx | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 978976bbc8ef33c75c3409fa9235f888765241d9
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Apr 11 23:25:57 2019 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Apr 11 23:32:18 2019 +0300
Run clang-format
Change-Id: I6287aee720bbddcb28142bcbdb910b89e942c4ec
diff --git a/include/comphelper/windowsdebugoutput.hxx b/include/comphelper/windowsdebugoutput.hxx
index 13c233361264..0b4201fe5452 100644
--- a/include/comphelper/windowsdebugoutput.hxx
+++ b/include/comphelper/windowsdebugoutput.hxx
@@ -34,8 +34,10 @@
#endif
#include <initguid.h>
-namespace {
-DEFINE_GUID(IID_IdentityUnmarshal, 0x0000001B, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
+namespace
+{
+DEFINE_GUID(IID_IdentityUnmarshal, 0x0000001B, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x46);
}
template <typename charT, typename traits>
commit 379cef94da6695d29d09b9dee3ed7add481dca2d
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Apr 11 23:23:46 2019 +0300
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Apr 11 23:32:18 2019 +0300
Don't crash if the BSTR pointer in a VARIANT is (weirdly) null
Change-Id: I8473b1f411a45c7c17e742ca0d69245d77f078f7
diff --git a/include/comphelper/windowsdebugoutput.hxx b/include/comphelper/windowsdebugoutput.hxx
index 04eb8b5dcf36..13c233361264 100644
--- a/include/comphelper/windowsdebugoutput.hxx
+++ b/include/comphelper/windowsdebugoutput.hxx
@@ -421,8 +421,11 @@ inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, t
stream << (double)rVariant.date;
break; // FIXME
case VT_BSTR:
- stream << std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t>().to_bytes(
- rVariant.bstrVal);
+ if (rVariant.bstrVal == nullptr)
+ stream << "(null)";
+ else
+ stream << std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t>().to_bytes(
+ rVariant.bstrVal);
break;
case VT_DISPATCH:
stream << rVariant.pdispVal;
More information about the Libreoffice-commits
mailing list