[Libreoffice-commits] core.git: svtools/source
Caolán McNamara
caolanm at redhat.com
Thu Nov 27 06:52:40 PST 2014
svtools/source/svhtml/parhtml.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 69a16331d0c60ae3d0f376d2265e83ab805ec13b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 27 14:51:27 2014 +0000
don't access contents of empty string, e.g. with kde96709-1.html
Change-Id: Ifa6db0dc7b5c67b65c5bc17c16fb3a61793c833a
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 98445ed..4d4da1d 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -233,8 +233,8 @@ void HTMLOption::GetColor( Color& rColor ) const
OUString aTmp(aValue.toAsciiLowerCase());
sal_uInt32 nColor = SAL_MAX_UINT32;
- if( '#' != aTmp[0] )
- nColor = GetHTMLColor( aTmp );
+ if (!aTmp.isEmpty() && aTmp[0] != '#')
+ nColor = GetHTMLColor(aTmp);
if( SAL_MAX_UINT32 == nColor )
{
More information about the Libreoffice-commits
mailing list