From 9c57dfdcd0f8448c7fe9b9435be4b7a57699f0fc Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sun, 14 Jul 2019 23:40:08 +0200 Subject: [PATCH] avoid segfault Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/bf056be525c09502a1ae6da1563295106c10cfab Author: Jacek Jendrzej Date: 2019-07-14 (Sun, 14 Jul 2019) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libeplayer3/playback/playback.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libeplayer3/playback/playback.c b/libeplayer3/playback/playback.c index 280faa1..70eb12d 100644 --- a/libeplayer3/playback/playback.c +++ b/libeplayer3/playback/playback.c @@ -420,8 +420,10 @@ static int32_t PlaybackStop(Context_t *context) context->playback->SlowMotion = 0; context->playback->Speed = 0; - context->output->Command(context, OUTPUT_STOP, NULL); - context->container->selectedContainer->Command(context, CONTAINER_STOP, NULL); + if (context->output && context->output->Command) + context->output->Command(context, OUTPUT_STOP, NULL); + if (context->container && context->container->selectedContainer) + context->container->selectedContainer->Command(context, CONTAINER_STOP, NULL); } else {