mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 08:10:03 +01:00
modesetting: Check for NULL mode_output before printing warning message
Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1816 Signed-off-by: Martin von Gagern <gagern@google.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1938>
This commit is contained in:
parent
010c00828a
commit
0d39d7a8f3
1 changed files with 13 additions and 5 deletions
|
|
@ -4220,11 +4220,19 @@ drmmode_update_kms_state(drmmode_ptr drmmode)
|
||||||
drmmode_set_mode_major(crtc, &crtc->mode, crtc->rotation,
|
drmmode_set_mode_major(crtc, &crtc->mode, crtc->rotation,
|
||||||
crtc->x, crtc->y);
|
crtc->x, crtc->y);
|
||||||
|
|
||||||
|
drmModeConnectorPtr mode_output = drmmode_output->mode_output;
|
||||||
|
if (mode_output) {
|
||||||
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
|
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
|
||||||
"hotplug event: connector %u's link-state is BAD, "
|
"hotplug event: connector %u's link-state is BAD, "
|
||||||
"tried resetting the current mode. You may be left "
|
"tried resetting the current mode. You may be left "
|
||||||
"with a black screen if this fails...\n",
|
"with a black screen if this fails...\n",
|
||||||
drmmode_output->mode_output->connector_id);
|
mode_output->connector_id);
|
||||||
|
} else {
|
||||||
|
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
|
||||||
|
"hotplug event: NULL connector's link-state is BAD, "
|
||||||
|
"tried resetting the current mode. You may be left "
|
||||||
|
"with a black screen if this fails...\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue