summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-23 10:06:38 +0000
committerAndras Timar <andras.timar@collabora.com>2018-04-12 10:54:28 +0200
commit25e37b643764e3c1b813584f336901ace5309fd8 (patch)
tree73898746c3b655279e6322055df71dfb02e3e136 /svx/source
parent52bc4c4a7782d6c0c6c2a480ead9138c1c743d7b (diff)
a11y crash with no chars selected in character map
type gibberish in character map search box, click character map widget, crash Change-Id: Ifa3e4bce2d7e0b84cf3c5033eb819c73076daabe Reviewed-on: https://gerrit.libreoffice.org/51775 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit ebd78caf7ff49328b902158ad101e9496b0f7a5b)
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/searchcharmap.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svx/source/dialog/searchcharmap.cxx b/svx/source/dialog/searchcharmap.cxx
index db6f4e37bbcd..66101b21d703 100644
--- a/svx/source/dialog/searchcharmap.cxx
+++ b/svx/source/dialog/searchcharmap.cxx
@@ -437,7 +437,8 @@ svx::SvxShowCharSetItem* SvxSearchCharSet::ImplGetItem( int _nPos )
aFind = m_aItems.emplace(_nPos, xItem).first;
OUStringBuffer buf;
std::unordered_map<sal_Int32,sal_UCS4>::const_iterator got = m_aItemList.find (_nPos);
- buf.appendUtf32( got->second );
+ if (got != m_aItemList.end())
+ buf.appendUtf32(got->second);
aFind->second->maText = buf.makeStringAndClear();
Point pix = MapIndexToPixel( _nPos );
aFind->second->maRect = tools::Rectangle( Point( pix.X() + 1, pix.Y() + 1 ), Size(nX-1,nY-1) );