Fix crash when unloading a partially loaded session.
authorRobin Gareus <robin@gareus.org>
Thu, 21 Sep 2017 15:35:52 +0000 (17:35 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 21 Sep 2017 15:35:52 +0000 (17:35 +0200)
libs/ardour/session.cc

index af0f66a889db97ce73fd190cf72eed24e93a5f82..f6f22ea1e36b91c876fc9fb13b77cd94581f2efa 100644 (file)
@@ -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