Update window.cpp

Fix use after free
This commit is contained in:
2024-06-21 16:24:38 -04:00
parent 7d2921f598
commit c0ecb08a3b

View File

@@ -60,9 +60,9 @@ void RWindow::lower() const
void RWindow::destroyWindow() {
DEBUG(std::format("Destroying window '{}'", this->title));
XDestroySubwindows(display, window);
DEBUG(std::format("Destroyed window '{}'", title));
XDestroyWindow(display, window);
delete this;
DEBUG(std::format("Destroyed window '{}'", this->title));
}
void RWindow::refresh() {