Fix crash when analysing audio of large-channel-count files.
authorCarl Hetherington <cth@carlh.net>
Sat, 2 Jul 2016 00:44:15 +0000 (01:44 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 2 Jul 2016 00:44:15 +0000 (01:44 +0100)
src/wx/audio_dialog.cc

index c753de5..19b5fe7 100644 (file)
@@ -89,6 +89,10 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Co
                _channel_checkbox[i]->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AudioDialog::channel_clicked, this, _1));
        }
 
+       for (int i = _channels; i < MAX_DCP_AUDIO_CHANNELS; ++i) {
+               _channel_checkbox[i] = 0;
+       }
+
        {
                wxStaticText* m = new wxStaticText (this, wxID_ANY, _("Type"));
                m->SetFont (subheading_font);