summaryrefslogtreecommitdiff
path: root/c++
diff options
context:
space:
mode:
Diffstat (limited to 'c++')
-rw-r--r--c++/window-opengl/gl_xcb.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/c++/window-opengl/gl_xcb.cpp b/c++/window-opengl/gl_xcb.cpp
index ed4e40b..f356307 100644
--- a/c++/window-opengl/gl_xcb.cpp
+++ b/c++/window-opengl/gl_xcb.cpp
@@ -97,8 +97,12 @@ void gpu_context<backend::gl_linux_xcb>::flush(){
}
}
-own<gpu_context<backend::gl_linux_xcb> > create_gpu_context(io_provider& prov, const gl_settings& settings){
- own<device<backend::linux_xcb>> device = create_xcb_device(prov);
+own<gpu_context<backend::gl_linux_xcb> > create_gl_context(io_provider& prov, const gl_settings& settings){
+ auto eodev = create_xcb_device(prov);
+ if(eodev.is_error()){
+ return nullptr;
+ }
+ own<device<backend::linux_xcb>>& device = eodev.get_value();
if (!device) {
return nullptr;
}