diff --git a/src/nidaqdev/NIFilePlayback.java b/src/nidaqdev/NIFilePlayback.java index f87a35ef..3b8b42ed 100644 --- a/src/nidaqdev/NIFilePlayback.java +++ b/src/nidaqdev/NIFilePlayback.java @@ -127,7 +127,8 @@ public class NIFilePlayback implements FilePlaybackDevice, PamSettings { @Override public boolean preparePlayback(PlaybackParameters playbackParameters) { - if (niDeviceLUT == null || niDeviceLUT.length <= playbackParameters.deviceNumber) { + if (niDeviceLUT == null || niDeviceLUT.length <= playbackParameters.deviceNumber + || playbackParameters.deviceNumber < 0) { return false; } int bn = niDeviceLUT[playbackParameters.deviceNumber];