summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c++/window-opengl/gl_xcb.cpp2
-rw-r--r--c++/window-opengl/gl_xcb.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/c++/window-opengl/gl_xcb.cpp b/c++/window-opengl/gl_xcb.cpp
index 26eb8cd..3bcd21a 100644
--- a/c++/window-opengl/gl_xcb.cpp
+++ b/c++/window-opengl/gl_xcb.cpp
@@ -208,7 +208,7 @@ gpu_window<backend::gl_linux_xcb>::~gpu_window() {
}
void gpu_window<backend::gl_linux_xcb>::bind() {
- assert(window_ && context_->device && context_->device_->get_xcb_display());
+ assert(window_ && context_->device_ && context_->device_->get_xcb_display());
if (window) {
if (context_->device_ && context_->device_->get_xcb_display()) {
::glXMakeContextCurrent(context_->device_->get_xcb_display(), glx_window_,
diff --git a/c++/window-opengl/gl_xcb.h b/c++/window-opengl/gl_xcb.h
index f7f5d6a..0d84662 100644
--- a/c++/window-opengl/gl_xcb.h
+++ b/c++/window-opengl/gl_xcb.h
@@ -29,6 +29,8 @@ private:
int visual_id_;
GLXContext context_;
GLXFBConfig fb_config_;
+
+ friend class gpu_window<backend::gl_linux_xcb>;
public:
gpu_context(const glx_library_extensions&, own<device<backend::linux_xcb>>, int, GLXContext, GLXFBConfig);
~gpu_context();