Commit 51e801ba authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: be sure that the conversion to Int from TYPE_ROLE worked

parent b670c924
...@@ -70,7 +70,10 @@ void PLSelector::setSource( QTreeWidgetItem *item ) ...@@ -70,7 +70,10 @@ void PLSelector::setSource( QTreeWidgetItem *item )
if( !item ) if( !item )
return; return;
int i_type = item->data( 0, TYPE_ROLE ).toInt(); bool b_ok;
int i_type = item->data( 0, TYPE_ROLE ).toInt( &b_ok );
if( !b_ok )
return;
assert( ( i_type == PL_TYPE || i_type == ML_TYPE || i_type == SD_TYPE ) ); assert( ( i_type == PL_TYPE || i_type == ML_TYPE || i_type == SD_TYPE ) );
if( i_type == SD_TYPE ) if( i_type == SD_TYPE )
......
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