app: reset g_app on ~App()
[staging/windowmanager.git] / src / app.cpp
index b261c53..29b28b5 100644 (file)
@@ -22,6 +22,10 @@ App::App(wl::display *d) : api{this}, display{d}, controller{}, outputs() {
    g_app = this;
 }
 
+App::~App() {
+   g_app = nullptr;
+}
+
 int App::init() {
    if (!this->display->ok()) {
       return -1;