Skip to content

Commit 46e0518

Browse files
authored
guard against disabled xcb module (#549)
1 parent 541a3e1 commit 46e0518

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/ui/classic/classicui.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,12 @@ void ClassicUI::update(UserInterfaceComponent component,
278278
// unfortunately, hopefully main display is X wayland.
279279
// The position will be wrong anyway.
280280
#ifdef ENABLE_X11
281-
auto mainX11Display = xcb()->call<IXCBModule::mainDisplay>();
282-
if (!mainX11Display.empty()) {
283-
if (auto *uiPtr = findValue(uis_, "x11:" + mainX11Display)) {
284-
ui = uiPtr->get();
281+
if (auto *xcbAddon = xcb()) {
282+
auto mainX11Display = xcbAddon->call<IXCBModule::mainDisplay>();
283+
if (!mainX11Display.empty()) {
284+
if (auto *uiPtr = findValue(uis_, "x11:" + mainX11Display)) {
285+
ui = uiPtr->get();
286+
}
285287
}
286288
}
287289
#endif

0 commit comments

Comments
 (0)