svl/source/misc/sharedstring.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 50fc62ce76bc51f18b16eae937761d0a8872df3e Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Tue May 23 20:52:02 2017 -0400 tdf#107945: Perhaps this will make this method thread-safe... Assuming that rtl_uString_new() is thread-safe, and static variable initialization is technically thread-safe, hopefully we can declare this static method thread-safe now. Change-Id: Ibc3685a576c2a6692bdf2beff79592290b42cc8a Reviewed-on: https://gerrit.libreoffice.org/38011 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoff...@kohei.us> diff --git a/svl/source/misc/sharedstring.cxx b/svl/source/misc/sharedstring.cxx index 9235783ce774..28f6473d0377 100644 --- a/svl/source/misc/sharedstring.cxx +++ b/svl/source/misc/sharedstring.cxx @@ -15,7 +15,7 @@ SharedString SharedString::getEmptyString() { // unicode string array for empty string is globally shared in OUString. // Let's take advantage of that. - rtl_uString* pData = nullptr; + static rtl_uString* pData = nullptr; rtl_uString_new(&pData); return SharedString(pData, pData); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits