Use a shared_ptr for SessionPlaylists so that it can be explicitly destroyed in ...
[ardour.git] / libs / ardour / audio_playlist_importer.cc
index 81ad16998930532c1beebce3739ecdff38a26250..cb6bbed907d3f5fc13eefd0e9d80975830d0a0f0 100644 (file)
@@ -30,6 +30,7 @@
 #include "ardour/session.h"
 #include "ardour/playlist.h"
 #include "ardour/playlist_factory.h"
+#include "ardour/session_playlists.h"
 
 using namespace std;
 using namespace PBD;
@@ -168,7 +169,7 @@ bool
 AudioPlaylistImporter::_prepare_move ()
 {
        // Rename
-       while (session.playlists.by_name (name) || !handler.check_name (name)) {
+       while (session.playlists->by_name (name) || !handler.check_name (name)) {
                std::pair<bool, string> rename_pair = Rename (_("A playlist with this name already exists, please rename it."), name);
                if (!rename_pair.first) {
                        return false;