files should have at least one channel.
authorRobin Gareus <robin@gareus.org>
Tue, 18 Nov 2014 01:13:15 +0000 (02:13 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 18 Nov 2014 01:15:07 +0000 (02:15 +0100)
libs/ardour/import.cc

index 1303c85511bf9bb93aebab7a63f1787e0925f9e2..656e8f7f761edd2afdb9b2febca9efd33c7e790e 100644 (file)
@@ -234,6 +234,7 @@ write_audio_data_to_new_files (ImportableSource* source, ImportStatus& status,
        const framecnt_t nframes = ResampledImportableSource::blocksize;
        boost::shared_ptr<AudioFileSource> afs;
        uint32_t channels = source->channels();
+       assert(channels > 0);
 
        boost::scoped_array<float> data(new float[nframes * channels]);
        vector<boost::shared_array<Sample> > channel_data;