mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2025-02-16 17:22:46 +00:00
NI Playback bug
Fix bug in NI playback which threw an exception if no devices were present and configured in NI-MAX
This commit is contained in:
parent
f5ff9da8dd
commit
bf5f0daca5
@ -127,7 +127,8 @@ public class NIFilePlayback implements FilePlaybackDevice, PamSettings {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean preparePlayback(PlaybackParameters playbackParameters) {
|
public boolean preparePlayback(PlaybackParameters playbackParameters) {
|
||||||
if (niDeviceLUT == null || niDeviceLUT.length <= playbackParameters.deviceNumber) {
|
if (niDeviceLUT == null || niDeviceLUT.length <= playbackParameters.deviceNumber
|
||||||
|
|| playbackParameters.deviceNumber < 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int bn = niDeviceLUT[playbackParameters.deviceNumber];
|
int bn = niDeviceLUT[playbackParameters.deviceNumber];
|
||||||
|
Loading…
Reference in New Issue
Block a user