diff --git a/GUIFramework/src/GUIFramework.cpp b/GUIFramework/src/GUIFramework.cpp index 6be131be..e49eefce 100644 --- a/GUIFramework/src/GUIFramework.cpp +++ b/GUIFramework/src/GUIFramework.cpp @@ -633,8 +633,12 @@ namespace gui_framework GUIFramework& GUIFramework::GUIFramework::get() { + static mutex getInstanceMutex; + if (!instance) { + unique_lock lock(getInstanceMutex); + instance.reset(new GUIFramework()); }