Commit 1a8b0cfe authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Input item type cannot be negative (fix warning)

parent 469f358d
...@@ -336,9 +336,8 @@ QVariant PLModel::data( const QModelIndex &index, int role ) const ...@@ -336,9 +336,8 @@ QVariant PLModel::data( const QModelIndex &index, int role ) const
} }
else if( role == Qt::DecorationRole && index.column() == 0 ) else if( role == Qt::DecorationRole && index.column() == 0 )
{ {
/* Use to segfault here because i_type wasn't always initialized */ /* Used 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] );
return QVariant( PLModel::icons[item->p_input->i_type] );
} }
else if( role == Qt::FontRole ) else if( role == Qt::FontRole )
{ {
......
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