steinbergmedia / vstgui

A user interface toolkit mainly for audio plug-ins
Other
857 stars 122 forks source link

fix close/reopen crash on linux. Fixes #249. #251

Closed andreas56 closed 2 years ago

andreas56 commented 2 years ago

cairo_device_finish must be called before closing the xcb connection, otherwise the invalid connection will not be removed from an internal cairo cache. When reopening the editor there's then a risk that the new connection has the same pointer value as the old one and that will cause a crash.

The call to cairo_device_finish should not be made until the last instance of the editor has been closed. If it's done earlier, the remaining editors will stop working.