Commit b039abe9 authored by Geoffroy Couprie's avatar Geoffroy Couprie

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

parent e33a82db
...@@ -309,6 +309,9 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg ) ...@@ -309,6 +309,9 @@ 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 ) ) );
if(i == 0)
p_intf->p_sys->filepath = QString::fromAscii("");
else
p_intf->p_sys->filepath = qfu( p_arg->psz_results[i] ); p_intf->p_sys->filepath = qfu( p_arg->psz_results[i] );
} }
......
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