diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/ustring.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx index 66e2fe03ce9d..d3bf1daedc78 100644 --- a/sal/rtl/ustring.cxx +++ b/sal/rtl/ustring.cxx @@ -543,20 +543,20 @@ void SAL_CALL rtl_uString_newFromAscii( rtl_uString** ppThis, *ppThis = rtl_uString_ImplAlloc( nLen ); OSL_ASSERT(*ppThis != nullptr); - if ( *ppThis ) - { - sal_Unicode* pBuffer = (*ppThis)->buffer; - do - { - assert(static_cast<unsigned char>(*pCharStr) < 0x80); // ASCII range - *pBuffer = *pCharStr; - pBuffer++; - pCharStr++; - } - while ( *pCharStr ); + if ( !(*ppThis) ) + return; - RTL_LOG_STRING_NEW( *ppThis ); + sal_Unicode* pBuffer = (*ppThis)->buffer; + do + { + assert(static_cast<unsigned char>(*pCharStr) < 0x80); // ASCII range + *pBuffer = *pCharStr; + pBuffer++; + pCharStr++; } + while ( *pCharStr ); + + RTL_LOG_STRING_NEW( *ppThis ); } void SAL_CALL rtl_uString_newFromCodePoints( |