xcb: check validity of RandR output info before using it
Fixes: QTBUG-128906 Pick-to: 6.7 6.5 6.2 5.15 Change-Id: Ibafdf4bb9c449b29437b0520299ab407238e5703 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 439e19be17b9169f5786b2593e6d1ac6978bb84b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>bb10
parent
c5a27f4cfe
commit
21098bbb9c
|
|
@ -140,7 +140,7 @@ void QXcbConnection::updateScreens(const xcb_randr_notify_event_t *event)
|
|||
// Screen has been disabled
|
||||
auto outputInfo = Q_XCB_REPLY(xcb_randr_get_output_info, xcb_connection(),
|
||||
output.output, output.config_timestamp);
|
||||
if (outputInfo->crtc == XCB_NONE) {
|
||||
if (!outputInfo || outputInfo->crtc == XCB_NONE) {
|
||||
qCDebug(lcQpaScreen) << "output" << screen->name() << "has been disabled";
|
||||
destroyScreen(screen);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue