summaryrefslogtreecommitdiff
path: root/src/wx/standard_controls.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx/standard_controls.cc')
-rw-r--r--src/wx/standard_controls.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/wx/standard_controls.cc b/src/wx/standard_controls.cc
index 1e4ecc8d7..6196c1b5c 100644
--- a/src/wx/standard_controls.cc
+++ b/src/wx/standard_controls.cc
@@ -63,14 +63,15 @@ StandardControls::play_clicked ()
void
StandardControls::check_play_state ()
{
- if (!_film || _film->video_frame_rate() == 0) {
+ auto viewer = _viewer.lock ();
+ if (!_film || _film->video_frame_rate() == 0 || !viewer) {
return;
}
if (_play_button->GetValue()) {
- _viewer->start ();
+ viewer->start ();
} else {
- _viewer->stop ();
+ viewer->stop ();
}
}