Commit b039abe9 authored by Geoffroy Couprie's avatar Geoffroy Couprie

Don't crash if I click "cancel" in getOpenFileNames

parent e33a82db
...@@ -309,7 +309,10 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg ) ...@@ -309,7 +309,10 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
i = 0; i = 0;
foreach( const QString &file, files ) foreach( const QString &file, files )
p_arg->psz_results[i++] = strdup( qtu( toNativeSepNoSlash( file ) ) ); p_arg->psz_results[i++] = strdup( qtu( toNativeSepNoSlash( file ) ) );
p_intf->p_sys->filepath = qfu( p_arg->psz_results[i] ); if(i == 0)
p_intf->p_sys->filepath = QString::fromAscii("");
else
p_intf->p_sys->filepath = qfu( p_arg->psz_results[i] );
} }
/* Callback */ /* Callback */
......
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