modesetting: return null for get_modes if output could not be retrieved

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
This commit is contained in:
Maarten Lankhorst 2013-03-26 15:19:52 +01:00
parent 6b79a8791d
commit 862bc28368

View File

@ -709,6 +709,9 @@ drmmode_output_get_modes(xf86OutputPtr output)
drmModePropertyPtr props;
xf86MonPtr mon = NULL;
if (!koutput)
return NULL;
/* look for an EDID property */
for (i = 0; i < koutput->count_props; i++) {
props = drmModeGetProperty(drmmode->fd, koutput->props[i]);