summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-05-25 15:09:45 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-25 15:09:45 +0100
commitb872223e0652ed828dc3b4ad1eb8a0bbb34a7da0 (patch)
treede2cc30521b4dbb2505bb179d4da11a1bd25a7ba /src
parente4ed001fff70bd10b94e61bf36cdffd1a679286d (diff)
Fix crash with no atmos.
Diffstat (limited to 'src')
-rw-r--r--src/reel.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/reel.cc b/src/reel.cc
index f7f267e4..717c8496 100644
--- a/src/reel.cc
+++ b/src/reel.cc
@@ -164,13 +164,13 @@ Reel::add (DecryptedKDM const & kdm)
list<DecryptedKDMKey> keys = kdm.keys ();
for (list<DecryptedKDMKey>::iterator i = keys.begin(); i != keys.end(); ++i) {
- if (i->id() == _main_picture->key_id()) {
+ if (_main_picture && i->id() == _main_picture->key_id()) {
_main_picture->asset()->set_key (i->key ());
}
- if (i->id() == _main_sound->key_id()) {
+ if (_main_sound && i->id() == _main_sound->key_id()) {
_main_sound->asset()->set_key (i->key ());
}
- if (i->id() == _atmos->key_id()) {
+ if (_atmos && i->id() == _atmos->key_id()) {
_atmos->asset()->set_key (i->key ());
}
}