diff --git a/src/i830_driver.c b/src/i830_driver.c index 9d38fba..e8540a0 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -1478,7 +1478,7 @@ static void i830_close_drm_master(ScrnInfoPtr scrn) { I830Ptr i830 = I830PTR(scrn); - if (i830->drmSubFD > 0) { + if (i830 != NULL && i830->drmSubFD > 0) { drmClose(i830->drmSubFD); i830->drmSubFD = -1; }