From 9f16745534f92ad7293bf43f6f0197348c0dc49b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 5 Apr 2018 14:29:47 +0100 Subject: Speculative fix for crash on startup with no audio devices (#1265). --- src/wx/film_viewer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 5cd09048c..ccb2b790d 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -818,7 +818,7 @@ FilmViewer::config_changed (Config::Property p) _audio.closeStream (); } - if (Config::instance()->sound()) { + if (Config::instance()->sound() && _audio.getDeviceCount() > 0) { unsigned int st = 0; if (Config::instance()->sound_output()) { while (st < _audio.getDeviceCount()) { -- cgit v1.2.3