[vlc-devel] [PATCH] Fix crash caused by using Volume Slider when no media file is loaded in VLMC

Hugo Beauzée-Luyssen hugo at beauzee.fr
Mon Mar 7 08:57:53 CET 2016


On 03/07/2016 08:12 AM, Ankur Gupta wrote:
> P.S. This patch is my attempt at GSOC 2016. I am a student of Masters in Computer 
> Science at BITS Pilani, Hyderabad Campus. Kindly revert if I should do more exhaustive patches. 
> ---
>  src/Renderer/ClipRenderer.cpp     | 6 +++++-
>  src/Renderer/WorkflowRenderer.cpp | 6 +++++-
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/src/Renderer/ClipRenderer.cpp b/src/Renderer/ClipRenderer.cpp
> index aecdd0a..ec11e09 100644
> --- a/src/Renderer/ClipRenderer.cpp
> +++ b/src/Renderer/ClipRenderer.cpp
> @@ -150,7 +150,11 @@ ClipRenderer::getVolume() const
>  void ClipRenderer::setVolume( int volume )
>  {
>      //Returns 0 if the volume was set, -1 if it was out of range
> -    return m_sourceRenderer->setVolume( volume );
> +    //Handles the 'Clip Preview Window' VolSlider Crash when media file is not loaded
> +    if(m_sourceRenderer != NULL)
> +    {
> +	m_sourceRenderer->setVolume( volume );
> +    }
>  }
>  
>  void
> diff --git a/src/Renderer/WorkflowRenderer.cpp b/src/Renderer/WorkflowRenderer.cpp
> index 24a9b55..dd2f88a 100644
> --- a/src/Renderer/WorkflowRenderer.cpp
> +++ b/src/Renderer/WorkflowRenderer.cpp
> @@ -277,7 +277,11 @@ WorkflowRenderer::getVolume() const
>  void WorkflowRenderer::setVolume( int volume )
>  {
>      //Returns 0 if the volume was set, -1 if it was out of range
> -    m_sourceRenderer->setVolume( volume );
> +    //Handles the 'Project Preview Window' VolSlider Crash when media file is not loaded
> +    if(m_sourceRenderer != NULL)
> +    {
> +	m_sourceRenderer->setVolume( volume );
> +    }
>  }
>  
>  qint64
> 
Hi,

Thanks for your patch, though this is the wrong mailing list. The one
you want is vlmc-devel at videolan.org

Regards,

-- 
Hugo Beauzée-Luyssen
www.beauzee.fr


More information about the vlc-devel mailing list