Commit f27113b1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

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

parent 9bc487d6
...@@ -190,6 +190,7 @@ OpenDialog::~OpenDialog() ...@@ -190,6 +190,7 @@ OpenDialog::~OpenDialog()
/* Used by VLM dialog and inputSlave selection */ /* Used by VLM dialog and inputSlave selection */
QString OpenDialog::getMRL( bool b_all ) QString OpenDialog::getMRL( bool b_all )
{ {
if( itemsMRL.size() == 0 ) return "";
return b_all ? itemsMRL[0] + ui.advancedLineInput->text() return b_all ? itemsMRL[0] + ui.advancedLineInput->text()
: itemsMRL[0]; : itemsMRL[0];
} }
...@@ -377,6 +378,7 @@ void OpenDialog::transcode() ...@@ -377,6 +378,7 @@ void OpenDialog::transcode()
void OpenDialog::stream( bool b_transcode_only ) void OpenDialog::stream( bool b_transcode_only )
{ {
QString soutMRL = getMRL(); QString soutMRL = getMRL();
if( soutMRL.isEmpty() ) return;
toggleVisible(); toggleVisible();
/* Dbg and send :D */ /* Dbg and send :D */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment