Fix: NPE when switching stream resolution of suspended model

This commit is contained in:
0xboobface 2018-11-14 12:46:13 +01:00
parent 40f0411bf3
commit 3bcbf100fe
1 changed files with 4 additions and 1 deletions

View File

@ -611,7 +611,10 @@ public class LocalRecorder implements Recorder {
@Override
public void switchStreamSource(Model model) throws IOException, InvalidKeyException, NoSuchAlgorithmException, IllegalStateException {
LOG.debug("Switching stream source to index {} for model {}", model.getStreamUrlIndex(), model.getName());
stopRecordingProcess(model);
Download download = recordingProcesses.get(model);
if(download != null) {
stopRecordingProcess(model);
}
tryRestartRecording(model);
}