[vlc-commits] Qt: fix crash in the playlist model
Jean-Philippe André
git at videolan.org
Tue Jan 18 15:31:39 CET 2011
vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Tue Jan 18 15:26:10 2011 +0100| [2cfc9f512a7d6655728ecfaf8d7937100e06a9bf] | committer: Jean-Philippe André
Qt: fix crash in the playlist model
Bug: right-click on an empty node leads to a segfault
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2cfc9f512a7d6655728ecfaf8d7937100e06a9bf
---
.../gui/qt4/components/playlist/playlist_model.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 1385493..25735b3 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -922,9 +922,11 @@ bool PLModel::popup( const QModelIndex & index, const QPoint &point, const QMode
qtr(I_POP_STREAM), this, SLOT( popupStream() ) );
menu.addAction( qtr(I_POP_SAVE), this, SLOT( popupSave() ) );
menu.addAction( QIcon( ":/menu/info" ), qtr(I_POP_INFO), this, SLOT( popupInfo() ) );
- if( !strncasecmp( p_input->psz_uri, "file://", 7 ) )
+ if( p_input->psz_uri && !strncasecmp( p_input->psz_uri, "file://", 7 ) )
+ {
menu.addAction( QIcon( ":/type/folder-grey" ),
qtr( I_POP_EXPLORE ), this, SLOT( popupExplore() ) );
+ }
menu.addSeparator();
}
if( canEdit() )
More information about the vlc-commits
mailing list