From 5ad6446616d203993ec3d4a0715418f170826f84 Mon Sep 17 00:00:00 2001 From: Konstantin Seiler Date: Sat, 2 Nov 2019 09:22:07 +1100 Subject: [PATCH] remove compiler warning --- playback/src/player.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/playback/src/player.rs b/playback/src/player.rs index 2e47c84c..7d26ecf1 100644 --- a/playback/src/player.rs +++ b/playback/src/player.rs @@ -495,7 +495,9 @@ impl PlayerInternal { let stream_data_rate = self.stream_data_rate(); if let Some(stream_loader_controller) = self.state.stream_loader_controller() { stream_loader_controller.set_stream_mode(); - if let PlayerState::Playing{..} = self.state { + } + if let PlayerState::Playing{..} = self.state { + if let Some(stream_loader_controller) = self.state.stream_loader_controller() { let wait_for_data_length = (2 * stream_loader_controller.ping_time_ms() * stream_data_rate) / 1000; stream_loader_controller.fetch_next_blocking(wait_for_data_length); }