Fix inconsistent session-check
authorRobin Gareus <robin@gareus.org>
Thu, 6 Dec 2018 01:23:09 +0000 (02:23 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 6 Dec 2018 01:24:30 +0000 (02:24 +0100)
commitbf874562ef14368a5648215b6dc71936f1c3b33e
tree574867416a5c9ea01417229a68226e8d5aa67cd6
parent2eae3b5cd19e845a2258fb578548c2b571e46348
Fix inconsistent session-check

under some circumstances, e.g. session-exit it is possible to to have
inconsistent information
    ARDOUR_UI::instance()->session_loaded == true
 && ARDOUR_UI::instance()->the_session() == NULL

This lead to a crash on MacOS/X. stopping the engine at exit may destory
an Aggregate Device, leading to DeviceListChanged which in turn updates
the engine-dialog..
 else if (ARDOUR_UI::instance()->session_loaded) {
   float active_sr = ARDOUR_UI::instance()->the_session()->nominal_sample_rate ();
gtk2_ardour/engine_dialog.cc