[vlmc-devel] commit: Effect: Fix potential crash when deleting an effect. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Sun Sep 5 18:14:02 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Sep  5 18:13:18 2010 +0200| [8a8503f7503b219b279257a71b898030751feacb] | committer: Hugo Beauzée-Luyssen 

Effect: Fix potential crash when deleting an effect.

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

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

diff --git a/src/EffectsEngine/Effect.cpp b/src/EffectsEngine/Effect.cpp
index 56d49cf..4e59022 100644
--- a/src/EffectsEngine/Effect.cpp
+++ b/src/EffectsEngine/Effect.cpp
@@ -36,7 +36,11 @@ Effect::Effect( const QString &fileName ) :
 
 Effect::~Effect()
 {
-    m_f0r_deinit();
+    if ( isLoaded() == true )
+    {
+        m_f0r_deinit();
+        unload();
+    }
     qDeleteAll( m_params );
     m_params.clear();
 }



More information about the Vlmc-devel mailing list