xcb: fix yet another crash when screens are disconnected
Can't assume that m_screens is not an empty list. Task-number: QTBUG-42985 Change-Id: I6f9422638c219123dc898813910d03c7afbd1450 Reviewed-by: Uli Schlachter <psychon@znc.in> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>bb10
parent
61b608dfb5
commit
d72da0b4b2
|
|
@ -1300,10 +1300,12 @@ void QXcbConnection::sendConnectionEvent(QXcbAtom::Atom a, uint id)
|
|||
memset(&event, 0, sizeof(event));
|
||||
|
||||
const xcb_window_t eventListener = xcb_generate_id(m_connection);
|
||||
xcb_screen_iterator_t it = xcb_setup_roots_iterator(m_setup);
|
||||
xcb_screen_t *screen = it.data;
|
||||
Q_XCB_CALL(xcb_create_window(m_connection, XCB_COPY_FROM_PARENT,
|
||||
eventListener, m_screens.at(0)->root(),
|
||||
eventListener, screen->root,
|
||||
0, 0, 1, 1, 0, XCB_WINDOW_CLASS_INPUT_ONLY,
|
||||
m_screens.at(0)->screen()->root_visual, 0, 0));
|
||||
screen->root_visual, 0, 0));
|
||||
|
||||
event.response_type = XCB_CLIENT_MESSAGE;
|
||||
event.format = 32;
|
||||
|
|
|
|||
Loading…
Reference in New Issue