[vlc-commits] player: fix crash on playlist clear
Victorien Le Couviour--Tuffet
git at videolan.org
Tue Nov 27 13:16:11 CET 2018
vlc | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet at gmail.com> | Mon Nov 19 19:10:53 2018 +0100| [deb281bc4c5300b74db5a6e670771b43728e4b39] | committer: Thomas Guillem
player: fix crash on playlist clear
When clearing an empty playlist, no media has ever been set.
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=deb281bc4c5300b74db5a6e670771b43728e4b39
---
src/input/player.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/input/player.c b/src/input/player.c
index 2014db8bf3..82b74f2aaa 100644
--- a/src/input/player.c
+++ b/src/input/player.c
@@ -2074,13 +2074,15 @@ vlc_player_SetCurrentMedia(vlc_player_t *player, input_item_t *media)
player->releasing_media = false;
player->has_next_media = true;
}
- else
+ else if (player->media)
{
/* The current media will be set to NULL once the current input is
* stopped */
player->releasing_media = true;
player->has_next_media = false;
}
+ else
+ return VLC_SUCCESS;
if (player->input)
{
More information about the vlc-commits
mailing list