projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix exception on adding an empty folder as content (#691).
[dcpomatic.git]
/
src
/
wx
/
content_panel.cc
diff --git
a/src/wx/content_panel.cc
b/src/wx/content_panel.cc
index 2552f50987c8136c125239674807a5ff1c1150c9..8ca0d5b29854bc9ba58611fda2db3f61098027eb 100644
(file)
--- 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) {