diff options
Diffstat (limited to 'src/wx/film_editor.cc')
| -rw-r--r-- | src/wx/film_editor.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index 7fa34c516..2cf6a0b6c 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -803,11 +803,16 @@ FilmEditor::content_add_folder_clicked () return; } - _film->examine_and_add_content ( - shared_ptr<ImageContent> ( - new ImageContent (_film, boost::filesystem::path (wx_to_std (d->GetPath ()))) - ) - ); + shared_ptr<ImageContent> ic; + + try { + ic.reset (new ImageContent (_film, boost::filesystem::path (wx_to_std (d->GetPath ())))); + } catch (FileError& e) { + error_dialog (this, std_to_wx (e.what ())); + return; + } + + _film->examine_and_add_content (ic); } void |
