[vlmc-devel] commit: Effects: Don't crash when unloading an invalid effect module. ( =?UTF-8?Q?Hugo=20Beauz=C3=A9e=2DLuyssen?==?UTF-8?Q?=20?=)

git at videolan.org git at videolan.org
Wed Dec 29 17:45:07 CET 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Wed Dec 29 17:44:24 2010 +0100| [704fd19dd9ae1d2b0db8b1aca7ef53d9a3ee2100] | committer: Hugo Beauzée-Luyssen 

Effects: Don't crash when unloading an invalid effect module.

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

 src/EffectsEngine/Effect.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/EffectsEngine/Effect.cpp b/src/EffectsEngine/Effect.cpp
index 4e59022..1a38246 100644
--- a/src/EffectsEngine/Effect.cpp
+++ b/src/EffectsEngine/Effect.cpp
@@ -30,7 +30,8 @@ Effect::Effect( const QString &fileName ) :
         m_type( Unknown ),
         m_major( -1 ),
         m_minor( -1 ),
-        m_nbParams( -1 )
+        m_nbParams( -1 ),
+        m_f0r_deinit( NULL )
 {
 }
 
@@ -38,7 +39,8 @@ Effect::~Effect()
 {
     if ( isLoaded() == true )
     {
-        m_f0r_deinit();
+        if ( m_f0r_deinit != NULL )
+            m_f0r_deinit();
         unload();
     }
     qDeleteAll( m_params );



More information about the Vlmc-devel mailing list