Close the LXVST X11 connection for good measure
authorRobin Gareus <robin@gareus.org>
Sun, 5 Mar 2017 21:15:30 +0000 (22:15 +0100)
committerRobin Gareus <robin@gareus.org>
Sun, 5 Mar 2017 21:15:30 +0000 (22:15 +0100)
gtk2_ardour/linux_vst_gui_support.cc

index 91ed0db96b58947cb6d8dc20c04352c6901ef41b..240ddc4c70291b2e68faad76b4a7290dfc65f188 100644 (file)
@@ -453,6 +453,10 @@ again:
                }
        }
 
+       if (LXVST_XDisplay) {
+               XCloseDisplay(LXVST_XDisplay);
+               LXVST_XDisplay = 0;
+       }
 
        /* some plugin UIs (looking at you, u-he^abique), do set thread-keys
         * and free, but not unset them.
@@ -534,6 +538,7 @@ int vstfx_init (void* ptr)
                vstfx_error ("** ERROR ** VSTFX: Failed starting GUI event thread");
 
                XCloseDisplay(LXVST_XDisplay);
+               LXVST_XDisplay = 0;
                gui_quit = 1;
 
                return -1;