summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/i830_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c
index c125a73e..d1acaa56 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1482,7 +1482,7 @@ static void
i830_close_drm_master(ScrnInfoPtr scrn)
{
I830Ptr i830 = I830PTR(scrn);
- if (i830->drmSubFD > 0) {
+ if (i830 && i830->drmSubFD > 0) {
drmClose(i830->drmSubFD);
i830->drmSubFD = -1;
}