[vlmc-devel] commit: EffectStack.cpp: Fixes potential crash, checks helper before calling the instance. (Rohit Yadav )

git at videolan.org git at videolan.org
Wed Sep 22 22:49:49 CEST 2010


vlmc | branch: master | Rohit Yadav <rohityadav89 at gmail.com> | Thu Sep 23 02:35:50 2010 +0530| [0ac23356357a9785335df7e2d10b35e8bbb2a967] | committer: Rohit Yadav 

EffectStack.cpp: Fixes potential crash, checks helper before calling the instance.

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

 src/Gui/effectsengine/EffectStack.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Gui/effectsengine/EffectStack.cpp b/src/Gui/effectsengine/EffectStack.cpp
index 306dee2..afd720e 100644
--- a/src/Gui/effectsengine/EffectStack.cpp
+++ b/src/Gui/effectsengine/EffectStack.cpp
@@ -108,6 +108,7 @@ EffectStack::remove()
 void
 EffectStack::add()
 {
-    EffectHelper    *helper = m_model->add( m_ui->addComboBox->currentText() );
-    addInstanceWidget( helper->effectInstance() );
+    EffectHelper *helper = m_model->add( m_ui->addComboBox->currentText() );
+    if( helper != NULL )
+        addInstanceWidget( helper->effectInstance() );
 }



More information about the Vlmc-devel mailing list