[vlc-commits] commit: Fix dangerous use of qtu() on anonymous QString ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Sat Apr 10 19:21:17 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 10 20:20:52 2010 +0300| [00e347bc75f5d3a785213b08ddd2c660b47239aa] | committer: Rémi Denis-Courmont
Fix dangerous use of qtu() on anonymous QString
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=00e347bc75f5d3a785213b08ddd2c660b47239aa
---
modules/gui/qt4/main_interface.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index edb4940..b7ed093 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -1003,9 +1003,9 @@ void MainInterface::dropEventPlay( QDropEvent *event, bool b_play )
/* D&D of a subtitles file, add it on the fly */
if( mimeData->urls().size() == 1 && THEMIM->getIM()->hasInput() )
{
- if( !input_AddSubtitle( THEMIM->getInput(),
- qtu( toNativeSeparators( mimeData->urls()[0].toLocalFile() ) ),
- true ) )
+ QString s = toNativeSeparators( mimeData->urls()[0].toLocalFile() );
+ if( s.length() > 0
+ && input_AddSubtitle( THEMIM->getInput(), qtu(s), true ) == 0 )
{
event->accept();
return;
More information about the vlc-commits
mailing list