diff --git a/modules/highgui/src/window_gtk.cpp b/modules/highgui/src/window_gtk.cpp index a07c3ad5cc..efa3fbd96f 100644 --- a/modules/highgui/src/window_gtk.cpp +++ b/modules/highgui/src/window_gtk.cpp @@ -2331,6 +2331,11 @@ public: class GTKBackendUI : public UIBackend { public: + GTKBackendUI() + { + // NB: avoid static initialization order fiasco + (void)getGTKWindows(); + } ~GTKBackendUI() CV_OVERRIDE { destroyAllWindows();