diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-22 09:18:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-22 16:45:06 +0100 |
commit | 12e2d518d89b349d989601e1aaa9e37ca5fba093 (patch) | |
tree | 14424b298314fe4e5055f909e75439412f334ed4 /wizards | |
parent | ae056434494dc35954cf39c37b730cb82b667412 (diff) |
coverity#1326397 Dereference null return value
Change-Id: Iafb022cf3bbdbaa8a6b230cb60377d90e64fe142
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/common/JavaTools.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/wizards/com/sun/star/wizards/common/JavaTools.java b/wizards/com/sun/star/wizards/common/JavaTools.java index aa8436c850d9..cfeb1427cac7 100644 --- a/wizards/com/sun/star/wizards/common/JavaTools.java +++ b/wizards/com/sun/star/wizards/common/JavaTools.java @@ -122,13 +122,15 @@ public class JavaTools public static int FieldInTable(String[][] SearchList, String SearchString) { int retvalue = -1; - int FieldLen = SearchList.length; - if (FieldLen > 0) { - for (int i = 0; i < FieldLen; i++) { - if (SearchList[i][0] != null) { - if (SearchList[i][0].equals(SearchString)) { - retvalue = i; - break; + if (SearchList != null) { + int FieldLen = SearchList.length; + if (FieldLen > 0) { + for (int i = 0; i < FieldLen; i++) { + if (SearchList[i][0] != null) { + if (SearchList[i][0].equals(SearchString)) { + retvalue = i; + break; + } } } } |