projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc93546
)
Be a bit more careful with content_factory().
author
Carl Hetherington
<cth@carlh.net>
Sat, 9 Jul 2022 18:39:10 +0000
(20:39 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 11 Jul 2022 10:22:11 +0000
(12:22 +0200)
src/wx/content_view.cc
patch
|
blob
|
history
diff --git
a/src/wx/content_view.cc
b/src/wx/content_view.cc
index c26186c552f550deda76858f47b92de262fb329e..57a5535c9bd8eb1b3d3208d77fb66ec4b19204f7 100644
(file)
--- a/
src/wx/content_view.cc
+++ b/
src/wx/content_view.cc
@@
-97,7
+97,10
@@
ContentView::update ()
if (is_directory(i) && (is_regular_file(i / "ASSETMAP") || is_regular_file(i / "ASSETMAP.xml"))) {
content.reset (new DCPContent(i));
} else if (i.path().extension() == ".mp4") {
- content = content_factory(i).front();
+ auto all_content = content_factory(i);
+ if (!all_content.empty()) {
+ content = all_content.front();
+ }
}
if (content) {