[vlmc-devel] [PATCH] Fix crash caused by using Volume Slider when no media (redited)

Hugo Beauzée-Luyssen hugo at beauzee.fr
Mon Mar 7 17:41:16 CET 2016


On 03/07/2016 02:32 PM, FearNotMyCreed . wrote:
>  From 57a2e520ab3963e04a5d41e56f209d29c20337d5 Mon Sep 17 00:00:00 2001
> From: Ankur Gupta <ankur.vision0 at gmail.com>
> Date: Mon, 7 Mar 2016 18:57:19 +0530
> Subject: [PATCH] Fix crash caused by using Volume Slider when no media
>
> ---
>   src/Renderer/ClipRenderer.cpp     | 9 +++++++--
>   src/Renderer/WorkflowRenderer.cpp | 9 +++++++--
>   2 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/src/Renderer/ClipRenderer.cpp b/src/Renderer/ClipRenderer.cpp
> index aecdd0a..d33da9c 100644
> --- a/src/Renderer/ClipRenderer.cpp
> +++ b/src/Renderer/ClipRenderer.cpp
> @@ -147,10 +147,15 @@ ClipRenderer::getVolume() const
>       return m_sourceRenderer->volume();
>   }
>
> -void ClipRenderer::setVolume( int volume )
> +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

Your mailer seems to have broken a few lines, here

> +    if(m_isRendering == true)
> +    {
> +        m_sourceRenderer->setVolume( volume );
> +    }
>   }
>
>   void
> diff --git a/src/Renderer/WorkflowRenderer.cpp
> b/src/Renderer/WorkflowRenderer.cpp

here

> index 24a9b55..ccb8a43 100644
> --- a/src/Renderer/WorkflowRenderer.cpp
> +++ b/src/Renderer/WorkflowRenderer.cpp
> @@ -274,10 +274,15 @@ WorkflowRenderer::getVolume() const
>       return m_sourceRenderer->volume();
>   }
>
> -void WorkflowRenderer::setVolume( int volume )
> +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

and here

> +    if( m_isRendering == true )
> +    {
> +    m_sourceRenderer->setVolume( volume );
> +    }
>   }
>
>   qint64
>
>

Also, the name from the email seems to take precedence over your git 
name. Could you send the patch directly as attachment?

Regards,


More information about the Vlmc-devel mailing list