[vlmc-devel] commit: ClipRenderer: Fixing potential crash when unsetting media, and asking to play again. (Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Thu Mar 11 00:08:44 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Thu Mar 11 00:08:25 2010 +0100| [fec587fd9f2b25721ed180d8704559df49720aa9] | committer: Hugo Beauzee-Luyssen 

ClipRenderer: Fixing potential crash when unsetting media, and asking to play again.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=fec587fd9f2b25721ed180d8704559df49720aa9
---

 src/Renderer/ClipRenderer.cpp |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/Renderer/ClipRenderer.cpp b/src/Renderer/ClipRenderer.cpp
index d894f36..7e010ff 100644
--- a/src/Renderer/ClipRenderer.cpp
+++ b/src/Renderer/ClipRenderer.cpp
@@ -62,6 +62,7 @@ ClipRenderer::setClip( Clip* clip )
     if ( clip == NULL )
     {
         m_selectedClip = NULL;
+        m_clipLoaded = false;
         return ;
     }
     m_selectedClip = clip;
@@ -125,10 +126,6 @@ ClipRenderer::togglePlayPause( bool forcePause )
         startPreview();
         return ;
     }
-    //If for some reason, nothing was loaded in startPreview(), we just return.
-    if ( m_clipLoaded == false )
-        return ;
-
     if ( m_paused == false && m_isRendering == true )
     {
         m_mediaPlayer->pause();



More information about the Vlmc-devel mailing list