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 c753de535cb8d49f1e5e74d7ba7cc0abd4a868a1..19b5fe759ead7081645b551ec389699b9bf1f7ef 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);