[vlc-devel] commit: Qt: Fix getMRL() and QList<T>::operator[]: "index out of range". Close #2458 (Jean-Baptiste Kempf )

git version control git at videolan.org
Tue Jan 27 09:54:47 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Jan 27 09:54:01 2009 +0100| [f27113b1f38fd11b7478de226ae2a0f0c783dee8] | committer: Jean-Baptiste Kempf 

Qt: Fix getMRL() and QList<T>::operator[]: "index out of range". Close #2458

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

 modules/gui/qt4/dialogs/open.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp
index 50761f2..27ea868 100644
--- a/modules/gui/qt4/dialogs/open.cpp
+++ b/modules/gui/qt4/dialogs/open.cpp
@@ -190,6 +190,7 @@ OpenDialog::~OpenDialog()
 /* Used by VLM dialog and inputSlave selection */
 QString OpenDialog::getMRL( bool b_all )
 {
+    if( itemsMRL.size() == 0 ) return "";
     return b_all ? itemsMRL[0] + ui.advancedLineInput->text()
                  : itemsMRL[0];
 }
@@ -377,6 +378,7 @@ void OpenDialog::transcode()
 void OpenDialog::stream( bool b_transcode_only )
 {
     QString soutMRL = getMRL();
+    if( soutMRL.isEmpty() ) return;
     toggleVisible();
 
     /* Dbg and send :D */




More information about the vlc-devel mailing list