projects
/
libdcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
<ContentVersion> is optional in Interop so we can't assume it's there.
[libdcp.git]
/
src
/
cpl.cc
diff --git
a/src/cpl.cc
b/src/cpl.cc
index ead592fd4e1e2abcc10879d75edc07081e2dcfa0..2768e797583b295b9b00ac93f15ab8d0378df55a 100644
(file)
--- a/
src/cpl.cc
+++ b/
src/cpl.cc
@@
-654,10
+654,13
@@
CPL::set_content_versions (vector<ContentVersion> v)
}
-ContentVersion
+optional<ContentVersion>
CPL::content_version () const
{
- DCP_ASSERT (!_content_versions.empty());
+ if (_content_versions.empty()) {
+ return optional<ContentVersion>();
+ }
+
return _content_versions[0];
}