summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-27 14:51:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-27 14:53:32 +0000
commite9fd03e6c36be7b99dad622207411a3479f69174 (patch)
tree008214d8b79185612d221904015901069603f8c1 /svtools
parent2618f8a724481b1a47a0ec8ca6ed2cad6fc21597 (diff)
don't access contents of empty string, e.g. with kde96709-1.html
Change-Id: Ifa6db0dc7b5c67b65c5bc17c16fb3a61793c833a (cherry picked from commit 69a16331d0c60ae3d0f376d2265e83ab805ec13b)
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/svhtml/parhtml.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 98445edf97b0..4d4da1d50610 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 )
{