summaryrefslogtreecommitdiff
path: root/c++
diff options
context:
space:
mode:
Diffstat (limited to 'c++')
-rw-r--r--c++/window/xcb.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/c++/window/xcb.cpp b/c++/window/xcb.cpp
index cd0e77c..4fd83dc 100644
--- a/c++/window/xcb.cpp
+++ b/c++/window/xcb.cpp
@@ -221,9 +221,10 @@ window<backend::linux_xcb>::window(device<backend::linux_xcb>& dev_, xcb_window_
{}
window<backend::linux_xcb>::~window(){
- device_.window_destroyed(xcb_window_);
- xcb_destroy_window(device_.xcb_connection, xcb_window_);
- device_.flush();
+ assert(device_);
+ device_->window_destroyed(xcb_window_);
+ xcb_destroy_window(device_->xcb_connection, xcb_window_);
+ device_->flush();
}
void window<backend::linux_xcb>::show(){