Fix crash in playlist selector for removed tracks.
authorRobin Gareus <robin@gareus.org>
Fri, 22 Sep 2017 23:57:25 +0000 (01:57 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 22 Sep 2017 23:57:25 +0000 (01:57 +0200)
Removing a Track does not delete its playlists and one can keep
Playlists after Cleanup. Don't crash if a the track that the playlist
originally belonged to does no longer exist.

gtk2_ardour/playlist_selector.cc

index 11d5d3a882fb8800b0e109c60ca43a50b16f508d..e58b69a818e22bb651be2221eb634c68ecd36446 100644 (file)
@@ -123,7 +123,7 @@ PlaylistSelector::show_for (RouteUI* ruix)
 
                string nodename;
 
-               if (tr->name().empty()) {
+               if (!tr || tr->name().empty()) {
                        nodename = _("unassigned");
                } else {
                        nodename = tr->name().c_str();