Kaydet (Commit) 12e2d518 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1326397 Dereference null return value

Change-Id: Iafb022cf3bbdbaa8a6b230cb60377d90e64fe142
üst ae056434
......@@ -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;
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment