summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-07-28 12:01:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-07-28 12:03:00 +0100
commitf9d3644d1e560fe5b2e6ae948cdd402045d64c3b (patch)
tree1d46980bc1b81b609597222f93a183e6829b9189 /cui
parent05d1bf1c78be73e67fed4bd4b5644512d41448ff (diff)
check that u_charName was successful
Change-Id: I55896eb939a864c3437e3f3c5b13c272966e4b85
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/cuicharmap.cxx6
1 files changed, 3 insertions, 3 deletions
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)