From 87f5cd30d14c718d4d3215fe2fde0d33af300984 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 21 Sep 2017 17:35:52 +0200 Subject: [PATCH] Fix crash when unloading a partially loaded session. --- libs/ardour/session.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index af0f66a889..f6f22ea1e3 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -749,8 +749,13 @@ Session::destroy () clear_clicks (); /* need to remove auditioner before monitoring section - * otherwise it is re-connected */ - auditioner->drop_references (); + * otherwise it is re-connected. + * Note: If a session was never successfully loaded, there + * may not yet be an auditioner. + */ + if (auditioner) { + auditioner->drop_references (); + } auditioner.reset (); /* drop references to routes held by the monitoring section