diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-17 14:30:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-17 14:30:21 +0100 |
| commit | 34f2b95c1638a2cfedf21de5a203d6c0b77abf11 (patch) | |
| tree | bd78b7dbca7d975a89ef9628f6d4b2fd783a39f1 /src/reel_asset.cc | |
| parent | 81ed0ebb725a7b5fec00ae209ba8b0d70ebc4ee1 (diff) | |
Use an optional<> where there should be one.
Diffstat (limited to 'src/reel_asset.cc')
| -rw-r--r-- | src/reel_asset.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/reel_asset.cc b/src/reel_asset.cc index 98387653..60c3242c 100644 --- a/src/reel_asset.cc +++ b/src/reel_asset.cc @@ -74,7 +74,9 @@ ReelAsset::ReelAsset (shared_ptr<Asset> asset, Fraction edit_rate, int64_t intri , _hash (asset->hash ()) { /* default _annotation_text to the leaf name of our file */ - _annotation_text = asset->file().leaf().string (); + if (asset->file ()) { + _annotation_text = asset->file()->leaf().string (); + } } ReelAsset::ReelAsset (shared_ptr<const cxml::Node> node) |
