diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-09-16 23:43:15 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-09-16 23:43:15 +0100 |
| commit | 0d36ac996c7aed9e283cd05314ae2124384df5ea (patch) | |
| tree | d3f437be303e3f0025cbb4b923126eec487a6f35 /src/wx | |
| parent | cc471c30e8aee47f7ef704c2ace995b0fce3e872 (diff) | |
Fix exception on adding an empty folder as content (#691).
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/content_panel.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index 2552f5098..8ca0d5b29 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -277,6 +277,10 @@ ContentPanel::add_folder_clicked () } shared_ptr<Content> content = content_factory (_film, path); + if (!content) { + error_dialog (_parent, _("No content found in this folder.")); + return; + } shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (content); if (ic) { |
