summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2013-03-26 15:19:52 +0100
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>2013-03-26 15:19:52 +0100
commit3c631228a9f57e73ee693d5283894db1a460e0a4 (patch)
tree33854d7365f1d3c4efe93f04d7bde016c31ece15
parente5b5297ac449fb4ac62cc6471f933ae2265778a2 (diff)
modesetting: return null for get_modes if output could not be retrieved
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
-rw-r--r--src/drmmode_display.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index e8ebef1..2dc7576 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -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]);