2015-09-16 Carl Hetherington <cth@carlh.net>
+ * Fix exception on adding an empty folder
+ as content (#691).
+
* Add config option for default standard
(SMPTE / Interop).
shared_ptr<Content> content;
if (boost::filesystem::is_directory (path)) {
+
+ if (boost::filesystem::is_empty (path)) {
+ return shared_ptr<Content> ();
+ }
+
/* Guess if this is a DCP or a set of images: read the first ten filenames and if they
are all valid image files we assume it is a set of images.
*/
}
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) {