Skip to content

Commit 9894740

Browse files
committed
x11: check for error
1 parent 7f701af commit 9894740

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/ruisapp/glue/linux/glue_xorg.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,10 @@ struct window_wrapper : public utki::destructable {
484484
visual_info->visual,
485485
AllocNone
486486
);
487-
// TODO: check for error?
487+
if (this->color_map == None) {
488+
// TODO: use XSetErrorHandler() to get error code
489+
throw std::runtime_error("XCreateColormap(): failed");
490+
}
488491
utki::scope_exit scope_exit_color_map([this]() {
489492
XFreeColormap(this->display.display, this->color_map);
490493
});

0 commit comments

Comments
 (0)