fix minor problem with recent cherry-picking from cairocanvas
[ardour.git] / libs / ardour / audio_playlist_importer.cc
index 681f563e688193aa8de5497eb41adc96012f7b72..34d46915f188e6f21feaa9417b804fc709051b82 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "ardour/audio_region_importer.h"
 #include "ardour/session.h"
-#include "ardour/playlist.h"
 #include "ardour/playlist_factory.h"
 #include "ardour/session_playlists.h"
 
@@ -178,7 +177,13 @@ AudioPlaylistImporter::_prepare_move ()
                }
                name = rename_pair.second;
        }
-       xml_playlist.property ("name")->set_value (name);
+       
+       XMLProperty* p = xml_playlist.property ("name");
+       if (!p) {
+               error << _("badly-formed XML in imported playlist") << endmsg;
+       }
+
+       p->set_value (name);
        handler.add_name (name);
 
        return true;