[vlc-commits] commit: Qt/Sout: avoid a possible crash (Jean-Baptiste Kempf )

git at videolan.org git at videolan.org
Sat Sep 4 20:17:50 CEST 2010


vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Sep  4 18:19:45 2010 +0200| [eb58ad6e1f9396d41dd81fbb935bb48a724eada2] | committer: Jean-Baptiste Kempf 

Qt/Sout: avoid a possible crash
(cherry picked from commit babf7fcca704ae8afe49c8887ca0435e3f2712bc)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=eb58ad6e1f9396d41dd81fbb935bb48a724eada2
---

 modules/gui/qt4/dialogs/sout.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/dialogs/sout.cpp b/modules/gui/qt4/dialogs/sout.cpp
index 1f512f8..3a6a53f 100644
--- a/modules/gui/qt4/dialogs/sout.cpp
+++ b/modules/gui/qt4/dialogs/sout.cpp
@@ -224,9 +224,12 @@ void SoutDialog::updateMRL()
     for( int i = 1; i < ui.destTab->count(); i++ )
     {
         VirtualDestBox *vdb = qobject_cast<VirtualDestBox *>(ui.destTab->widget( i ));
-        QString tempMRL = vdb->getMRL( qs_mux );
+        if( !vdb )
+            continue;
 
+        QString tempMRL = vdb->getMRL( qs_mux );
         if( tempMRL.isEmpty() ) continue;
+
         if( multi )
             smrl.option( "dst", tempMRL );
         else



More information about the vlc-commits mailing list