Compositor: fix crash on exit

This commit is contained in:
vaxerski
2023-03-09 14:19:41 +00:00
parent 878fe20409
commit ca1c1438e3
2 changed files with 8 additions and 2 deletions

View File

@@ -73,13 +73,15 @@ int main(int argc, char** argv) {
sd_notify(0, "STOPPING=1");
#endif
wl_display_destroy_clients(g_pCompositor->m_sWLDisplay);
if (g_pCompositor->m_sWLDisplay)
wl_display_destroy_clients(g_pCompositor->m_sWLDisplay);
// kill all clients
for (auto& c : g_pCompositor->m_dProcessPIDsOnShutdown)
kill(c, SIGKILL);
wl_display_destroy(g_pCompositor->m_sWLDisplay);
if (g_pCompositor->m_sWLDisplay)
wl_display_destroy(g_pCompositor->m_sWLDisplay);
return EXIT_SUCCESS;
}