Added check to null pointer
This commit is contained in:
parent
f4bffad07a
commit
ed1f7bfc1a
1 changed files with 7 additions and 6 deletions
|
@ -157,14 +157,15 @@ public class BinaryMapDataObject {
|
||||||
|
|
||||||
public int getSimpleLayer(){
|
public int getSimpleLayer(){
|
||||||
if(mapIndex != null) {
|
if(mapIndex != null) {
|
||||||
for (int i = 0; i < additionalTypes.length; i++) {
|
if (additionalTypes != null) {
|
||||||
if (mapIndex.positiveLayers.contains(additionalTypes[i])) {
|
for (int i = 0; i < additionalTypes.length; i++) {
|
||||||
return 1;
|
if (mapIndex.positiveLayers.contains(additionalTypes[i])) {
|
||||||
} else if (mapIndex.negativeLayers.contains(additionalTypes[i])) {
|
return 1;
|
||||||
return -1;
|
} else if (mapIndex.negativeLayers.contains(additionalTypes[i])) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue