highgui(gtk): fix initialization order of global objects

This commit is contained in:
Alexander Alekhin 2021-06-09 09:04:29 +00:00
parent f4abafb093
commit 80238880e6

View File

@ -2331,6 +2331,11 @@ public:
class GTKBackendUI : public UIBackend
{
public:
GTKBackendUI()
{
// NB: avoid static initialization order fiasco
(void)getGTKWindows();
}
~GTKBackendUI() CV_OVERRIDE
{
destroyAllWindows();