diff --git a/autotests/integration/kwin_wayland_test.cpp b/autotests/integration/kwin_wayland_test.cpp index 87753f52a3..50a603115e 100644 --- a/autotests/integration/kwin_wayland_test.cpp +++ b/autotests/integration/kwin_wayland_test.cpp @@ -80,7 +80,6 @@ WaylandTestApplication::~WaylandTestApplication() if (effects) { static_cast(effects)->unloadAllEffects(); } - destroyPlugins(); delete m_xwayland; m_xwayland = nullptr; destroyWorkspace(); @@ -90,7 +89,6 @@ WaylandTestApplication::~WaylandTestApplication() } waylandServer()->terminateClientConnections(); destroyCompositor(); - destroyColorManager(); } void WaylandTestApplication::performStartup() diff --git a/src/main.cpp b/src/main.cpp index 61a39fd0c1..10590a9283 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -148,6 +148,8 @@ void Application::start() Application::~Application() { delete options; + destroyPlugins(); + destroyColorManager(); destroyAtoms(); destroyPlatform(); } diff --git a/src/main_wayland.cpp b/src/main_wayland.cpp index 0abe4bee46..c4ee37f620 100644 --- a/src/main_wayland.cpp +++ b/src/main_wayland.cpp @@ -136,7 +136,6 @@ ApplicationWayland::~ApplicationWayland() if (effects) { static_cast(effects)->unloadAllEffects(); } - destroyPlugins(); delete m_xwayland; m_xwayland = nullptr; destroyWorkspace(); @@ -147,7 +146,6 @@ ApplicationWayland::~ApplicationWayland() } waylandServer()->terminateClientConnections(); destroyCompositor(); - destroyColorManager(); } void ApplicationWayland::performStartup() diff --git a/src/main_x11.cpp b/src/main_x11.cpp index 48eb5e2ee8..6b48d8de06 100644 --- a/src/main_x11.cpp +++ b/src/main_x11.cpp @@ -190,8 +190,6 @@ void ApplicationX11::setReplace(bool replace) void ApplicationX11::lostSelection() { sendPostedEvents(); - destroyPlugins(); - destroyColorManager(); destroyCompositor(); destroyWorkspace(); // Remove windowmanager privileges