diff --git a/Libraries/LibGUI/Application.cpp b/Libraries/LibGUI/Application.cpp index dd256ebdca..259f0ffe4d 100644 --- a/Libraries/LibGUI/Application.cpp +++ b/Libraries/LibGUI/Application.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include #include @@ -39,17 +40,17 @@ namespace GUI { -static WeakPtr s_the; +static NeverDestroyed> s_the; Application* Application::the() { - return s_the; + return *s_the; } Application::Application(int argc, char** argv) { - ASSERT(!s_the); - s_the = make_weak_ptr(); + ASSERT(!*s_the); + *s_the = make_weak_ptr(); m_event_loop = make(); WindowServerConnection::the(); Clipboard::initialize({});