[vlmc-devel] commit: Adding missing pointer initializations. (Hugo Beauzee-Luyssen )

git at videolan.org git at videolan.org
Sun Mar 21 22:23:02 CET 2010


vlmc | branch: master | Hugo Beauzee-Luyssen <beauze.h at gmail.com> | Sun Mar 21 21:55:49 2010 +0100| [2de7888c69dfd9b78af21d2df1b0785e88c52914] | committer: Hugo Beauzee-Luyssen 

Adding missing pointer initializations.

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

 src/Renderer/WorkflowRenderer.cpp |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/Renderer/WorkflowRenderer.cpp b/src/Renderer/WorkflowRenderer.cpp
index 1dbccb1..e1b1093 100644
--- a/src/Renderer/WorkflowRenderer.cpp
+++ b/src/Renderer/WorkflowRenderer.cpp
@@ -42,6 +42,8 @@ WorkflowRenderer::WorkflowRenderer() :
             m_mainWorkflow( MainWorkflow::getInstance() ),
             m_stopping( false ),
             m_outputFps( 0.0f ),
+            m_videoEsHandler( NULL ),
+            m_audioEsHandler( NULL ),
             m_oldLength( 0 ),
             m_renderVideoFrame( NULL ),
             m_media( NULL ),
@@ -75,9 +77,12 @@ WorkflowRenderer::~WorkflowRenderer()
 {
     killRenderer();
 
-    delete m_videoEsHandler;
-    delete m_audioEsHandler;
-    delete m_media;
+    if ( m_videoEsHandler )
+        delete m_videoEsHandler;
+    if ( m_audioEsHandler )
+        delete m_audioEsHandler;
+    if ( m_media )
+        delete m_media;
 }
 
 void



More information about the Vlmc-devel mailing list