summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-04-05 14:29:47 +0100
committerCarl Hetherington <cth@carlh.net>2018-04-11 01:30:12 +0100
commitca813d739545b5b8fd7cbd7547f2cb197c222b82 (patch)
treec6377dd5c731055de42abe322b4f0db368b95b3b /src
parent88014e17b6e5ebee4f46f7e71c497b38e7764922 (diff)
Speculative fix for crash on startup with no audio devices (#1265).
Diffstat (limited to 'src')
-rw-r--r--src/wx/film_viewer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index 1103db159..9d79dd956 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -796,7 +796,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()) {