diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/playlist.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index e3d0c8ebb..b5faec567 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -426,9 +426,10 @@ Playlist::move_earlier (shared_ptr<Content> c) return; } + shared_ptr<Content> previous_c = *previous; - DCPTime const p = (*previous)->position (); - (*previous)->set_position (p + c->length_after_trim ()); + DCPTime const p = previous_c->position (); + previous_c->set_position (p + c->length_after_trim ()); c->set_position (p); } @@ -449,8 +450,10 @@ Playlist::move_later (shared_ptr<Content> c) return; } - (*next)->set_position (c->position ()); - c->set_position (c->position() + (*next)->length_after_trim ()); + shared_ptr<Content> next_c = *next; + + next_c->set_position (c->position ()); + c->set_position (c->position() + next_c->length_after_trim ()); } int64_t |
