summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/wx/film_viewer.cc2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 40808c6b3..2fa259e61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2018-04-05 Carl Hetherington <cth@carlh.net>
+ * Fix crash on startup if there are no audio devices (#1265).
+
* Fix non-working arrow keys / space in text fields (#1263).
* Fix assertion failures with 3D content in some cases.
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()) {