diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2023-09-19 16:20:12 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2023-09-19 16:20:12 +0200 |
commit | ad8f97071acc96dad7ec47e553cebc0e67ecdb90 (patch) | |
tree | 56a07fd51b91c7b2980c238e35146556c245e023 /c++/window-opengl | |
parent | 288a74deb3d5f7dfa38a629adb3e06a6d5ebfcb6 (diff) |
window-opengl: Fixing to proper return value
Diffstat (limited to 'c++/window-opengl')
-rw-r--r-- | c++/window-opengl/gl_xcb.cpp | 8 |
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; } |