diff --git a/libs/ardour/import_pt.cc b/libs/ardour/import_pt.cc index 3d9e979f3f..604fd0016c 100644 --- a/libs/ardour/import_pt.cc +++ b/libs/ardour/import_pt.cc @@ -335,6 +335,11 @@ Session::import_pt_rest (PTFFormat& ptf) } } + /* Check for no audio */ + if (ptf.tracks ().size () == 0) { + goto no_audio_tracks; + } + /* Create all tracks */ ntr = (ptf.tracks ().at (ptf.tracks ().size () - 1)).index + 1; nth = -1; @@ -387,6 +392,7 @@ Session::import_pt_rest (PTFFormat& ptf) (*pl).playlist->thaw (); } +no_audio_tracks: /* MIDI - Find list of unique midi tracks first */ for (vector::const_iterator a = ptf.miditracks ().begin (); a != ptf.miditracks ().end (); ++a) {