mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-25 08:32:32 +00:00
Fix Effort null pointers
Trap a coupld of null pointer exceptions which get thrown when there are no acoustic data.
This commit is contained in:
parent
56bab82be3
commit
e29f6f0589
@ -44,6 +44,9 @@ public class EffortFunctions {
|
||||
private DeploymentOverview createOverview(RecordingList tempPeriods) {
|
||||
|
||||
DutyCycleInfo dutyCycleinfo = assessDutyCycle(tempPeriods);
|
||||
if (dutyCycleinfo == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// if it's duty cycles, then we only want a single entry.
|
||||
RecordingList deploymentPeriods;
|
||||
@ -274,6 +277,9 @@ public class EffortFunctions {
|
||||
* @return
|
||||
*/
|
||||
private DutyCycleInfo assessDutyCycle(RecordingList tempPeriods) {
|
||||
if (tempPeriods == null) {
|
||||
return null;
|
||||
}
|
||||
int n = tempPeriods.size();
|
||||
if (n < 2) {
|
||||
return new DutyCycleInfo(false, 0,0,n);
|
||||
|
Loading…
Reference in New Issue
Block a user