diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-02-18 16:41:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-02-18 17:21:18 +0000 |
commit | 825e23ff12eca36d299b8903af340e3795bcbf16 (patch) | |
tree | f4c39dbb1e22154612e21eca5f0cb2c4c5504cc1 /wizards | |
parent | 56d43328d7e15b73ea76c72ac4cab82940ce95fa (diff) |
coverity#1326383 Dereference null return value
Change-Id: Iaa1769e4ecf116bfbab32b9ef6f6413e25a5f5fe
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/form/StyleApplier.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/wizards/com/sun/star/wizards/form/StyleApplier.java b/wizards/com/sun/star/wizards/form/StyleApplier.java index 3f20fd818965..88c1a63fb8b0 100644 --- a/wizards/com/sun/star/wizards/form/StyleApplier.java +++ b/wizards/com/sun/star/wizards/form/StyleApplier.java @@ -349,10 +349,12 @@ public class StyleApplier String sFilePath = getStylePath() + "/" + _filename; int[] oStylePropList = new int[6]; String[] sData = FileAccess.getDataFromTextFile(xMSF, sFilePath); - oStylePropList[SOBACKGROUNDCOLOR] = getStyleColor(sData, ".toctitle {", "background-color:"); - oStylePropList[SODBTEXTCOLOR] = getStyleColor(sData, ".doctitle {", "color:"); - oStylePropList[SOLABELTEXTCOLOR] = getStyleColor(sData, ".toctitle {", "color:"); - oStylePropList[SOBORDERCOLOR] = getStyleColor(sData, ".tcolor {", "border-color:"); + if (sData != null) { + oStylePropList[SOBACKGROUNDCOLOR] = getStyleColor(sData, ".toctitle {", "background-color:"); + oStylePropList[SODBTEXTCOLOR] = getStyleColor(sData, ".doctitle {", "color:"); + oStylePropList[SOLABELTEXTCOLOR] = getStyleColor(sData, ".toctitle {", "color:"); + oStylePropList[SOBORDERCOLOR] = getStyleColor(sData, ".tcolor {", "border-color:"); + } return oStylePropList; } |