From f9d3644d1e560fe5b2e6ae948cdd402045d64c3b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 28 Jul 2017 12:01:43 +0100 Subject: check that u_charName was successful Change-Id: I55896eb939a864c3437e3f3c5b13c272966e4b85 --- cui/source/dialogs/cuicharmap.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cui') diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 05626672e419..70b86a82149f 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -510,8 +510,7 @@ void SvxCharacterMap::init() /* get the character name */ u_charName((UChar32)90, U_UNICODE_CHAR_NAME, buffer, sizeof(buffer), &errorCode); - - if(U_SUCCESS(errorCode)) + if (U_SUCCESS(errorCode)) m_pCharName->SetText(OUString::createFromAscii(buffer)); } @@ -672,7 +671,8 @@ void SvxCharacterMap::setCharName(sal_UCS4 nDecimalValue) UErrorCode errorCode = U_ZERO_ERROR; char buffer[100]; u_charName(nDecimalValue, U_UNICODE_CHAR_NAME, buffer, sizeof(buffer), &errorCode); - m_pCharName->SetText(OUString::createFromAscii(buffer)); + if (U_SUCCESS(errorCode)) + m_pCharName->SetText(OUString::createFromAscii(buffer)); } IMPL_LINK_NOARG(SvxCharacterMap, SubsetSelectHdl, ListBox&, void) -- cgit v1.2.3