Prefer testing the session instead of using a global variable
[ardour.git] / gtk2_ardour / sfdb_ui.cc
index 2c4d5b4db673bd8209a3e2658c3570bacfecead3..37a9126a8ca6916f419639bf1f683f992982740e 100644 (file)
@@ -2057,7 +2057,7 @@ SoundFileOmega::do_something (int action)
 {
        SoundFileBrowser::do_something (action);
 
-       if (action == RESPONSE_CLOSE) {
+       if (action == RESPONSE_CLOSE || !ARDOUR_UI_UTILS::engine_is_running ()) {
                hide ();
                return;
        }