diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-07-09 20:39:10 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-07-11 12:22:11 +0200 |
| commit | 70890b3f8e5e083be45016091a0e01c113d357dd (patch) | |
| tree | 29d2488f0f73fa4ee40fa81cfaaef848dfe56320 | |
| parent | bc9354685d059d91a040a9520bedc030746ce5cf (diff) | |
Be a bit more careful with content_factory().
| -rw-r--r-- | src/wx/content_view.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wx/content_view.cc b/src/wx/content_view.cc index c26186c55..57a5535c9 100644 --- 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) { |
