From 74460d938e93e0b5d2f71e3b96af12ec795f25ee Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Fri, 15 Jun 2018 17:34:05 +0300 Subject: [PATCH] PlayerWidget::seek handle the case where the offset might be none. --- hammond-gtk/src/widgets/player.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hammond-gtk/src/widgets/player.rs b/hammond-gtk/src/widgets/player.rs index e989a47..8421ba0 100644 --- a/hammond-gtk/src/widgets/player.rs +++ b/hammond-gtk/src/widgets/player.rs @@ -321,7 +321,7 @@ impl PlayerExt for PlayerWidget { // Adapted from https://github.com/philn/glide/blob/b52a65d99daeab0b487f79a0e1ccfad0cd433e22/src/player_context.rs#L219-L245 fn seek(&self, offset: ClockTime, direction: SeekDirection) { let position = self.player.get_position(); - if position == ClockTime::none() { + if position.is_none() || offset.is_none() { return; }