]> git.sesse.net Git - vlc/commitdiff
Input item type cannot be negative (fix warning)
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 5 Dec 2009 10:51:19 +0000 (12:51 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 5 Dec 2009 10:51:19 +0000 (12:51 +0200)
modules/gui/qt4/components/playlist/playlist_model.cpp

index 3d0e6f18fbf115065288a8438275a086542ef8a7..fe586d94e8a27db1195d03fa02b2ca2d28206f3d 100644 (file)
@@ -336,9 +336,8 @@ QVariant PLModel::data( const QModelIndex &index, int role ) const
     }
     else if( role == Qt::DecorationRole && index.column() == 0  )
     {
-        /* Use to segfault here because i_type wasn't always initialized */
-        if( item->p_input->i_type >= 0 )
-            return QVariant( PLModel::icons[item->p_input->i_type] );
+        /* Used to segfault here because i_type wasn't always initialized */
+        return QVariant( PLModel::icons[item->p_input->i_type] );
     }
     else if( role == Qt::FontRole )
     {