xcb: check validity of RandR output info before using it
Fixes: QTBUG-128906 Pick-to: 6.8 6.7 6.5 6.2 5.15 Change-Id: Ibafdf4bb9c449b29437b0520299ab407238e5703 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
1c9a7855de
commit
439e19be17
@ -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…
x
Reference in New Issue
Block a user