diff options
Diffstat (limited to 'src/wx/closed_captions_dialog.cc')
| -rw-r--r-- | src/wx/closed_captions_dialog.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wx/closed_captions_dialog.cc b/src/wx/closed_captions_dialog.cc index 3989a2f49..b64c4c548 100644 --- a/src/wx/closed_captions_dialog.cc +++ b/src/wx/closed_captions_dialog.cc @@ -149,11 +149,10 @@ ClosedCaptionsDialog::update() if (!_current && !_tracks.empty()) { /* We have no current one: get another */ - auto butler = _butler.lock(); DCPOMATIC_ASSERT(_track->GetSelection() >= 0); DCPOMATIC_ASSERT(_track->GetSelection() < int(_tracks.size())); auto track = _tracks[_track->GetSelection()]; - if (butler) { + if (auto butler = _butler.lock()) { while (true) { auto d = butler->get_closed_caption(); if (!d) { @@ -190,7 +189,7 @@ ClosedCaptionsDialog::update() _current_in_lines = true; } - if (!_current && _tracks.empty()) { + if (!_current) { for (int i = 0; i < MAX_CLOSED_CAPTION_LINES; ++i) { _lines[i] = wxString(); } @@ -202,6 +201,7 @@ ClosedCaptionsDialog::clear() { _current = {}; _current_in_lines = false; + update(); Refresh(); } |
