mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-21 22:52:22 +00:00
Grid movement
Fix bug that threw null pointer if grid movement used on a simulated object without a set name.
This commit is contained in:
parent
d27e4fb19f
commit
4e0eab5d75
@ -131,7 +131,12 @@ public class GridMovement extends MovementModel implements PamSettings {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnitName() {
|
public String getUnitName() {
|
||||||
return getSimObject().name;
|
if (getSimObject() != null && getSimObject().name != null) {
|
||||||
|
return getSimObject().name;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return "Unknown";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user