summaryrefslogtreecommitdiff
path: root/src/intel_display.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-06-04 12:41:05 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-06-04 12:41:05 +0100
commitff91fd4a2749f1ea8722189aaec938e51bce4222 (patch)
tree748044ff8b39ff104fb12af347af1c86efa6fab2 /src/intel_display.c
parent4712a4008aaff7b3c57a8dd0a5e639992c9b6d30 (diff)
uxa: Check for failure from drmModeGetConnector()
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/intel_display.c')
-rw-r--r--src/intel_display.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/intel_display.c b/src/intel_display.c
index fcb3239d..7d75abb4 100644
--- a/src/intel_display.c
+++ b/src/intel_display.c
@@ -717,6 +717,12 @@ intel_output_detect(xf86OutputPtr output)
drmModeFreeConnector(intel_output->mode_output);
intel_output->mode_output =
drmModeGetConnector(mode->fd, intel_output->output_id);
+ if (intel_output->mode_output == NULL) {
+ /* and hope we are safe everywhere else */
+ xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,
+ "drmModeGetConnector failed, reporting output disconnected\n");
+ return XF86OutputStatusDisconnected;
+ }
switch (intel_output->mode_output->connection) {
case DRM_MODE_CONNECTED: