diff options
-rw-r--r-- | src/app.cpp | 4 | ||||
-rw-r--r-- | src/app.hpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/app.cpp b/src/app.cpp index b261c53..29b28b5 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -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; diff --git a/src/app.hpp b/src/app.hpp index 4e1c4ff..172e688 100644 --- a/src/app.hpp +++ b/src/app.hpp @@ -32,6 +32,10 @@ struct App { std::vector<std::unique_ptr<struct wl::output>> outputs; App(wl::display *d); + ~App(); + + App(App const &) = delete; + App &operator=(App const &) = delete; int init(); int dispatch_events(); |