diff --git a/main.cpp b/main.cpp index 8799410677..e53342baaa 100644 --- a/main.cpp +++ b/main.cpp @@ -161,6 +161,7 @@ Application::~Application() { delete options; destroyAtoms(); + destroyPlatform(); } void Application::destroyAtoms() @@ -169,6 +170,12 @@ void Application::destroyAtoms() atoms = nullptr; } +void Application::destroyPlatform() +{ + delete m_platform; + m_platform = nullptr; +} + void Application::resetCrashesCount() { crashes = 0; diff --git a/main.h b/main.h index ba6bbba2ff..3033ed66f6 100644 --- a/main.h +++ b/main.h @@ -231,6 +231,7 @@ protected: emit x11ConnectionChanged(); } void destroyAtoms(); + void destroyPlatform(); void setTerminating() { m_terminating = true;