diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-03-09 14:19:41 +0000 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-03-09 14:19:54 +0000 |
| commit | ca1c1438e32fbf84408c187449d5fd17c9f5fdc2 (patch) | |
| tree | 8281c27abad251c2b9ad144e7b048f363593b6db /src/main.cpp | |
| parent | 878fe204096d08a4dc4fa359c19120720517cf2f (diff) | |
Compositor: fix crash on exit
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 2f2674f2..50a69937 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; } |
