diff options
author | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2008-02-22 13:39:47 -0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2008-02-22 13:39:47 -0800 |
commit | 377e54a3dd343ee22f471072224fb185351ae448 (patch) | |
tree | a07e4c7f2be4789b64c98fe934ce6c47cd87a11c | |
parent | c905a380fac53ebf2d990bf0546b7b883ac39548 (diff) |
Don't walk into LpRing struct if it doesn't exist
Fix from Lukas Hejtmanek <xhejtman@ics.muni.cz>.
If we're called early on, the ring may not be allocated yet, so we can't just
read the mem field w/o checking whether LpRing exits or not.
-rw-r--r-- | src/i830_driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index ca6fbd75..5d533505 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -1861,7 +1861,7 @@ i830_refresh_ring(ScrnInfoPtr pScrn) /* If we're reaching RefreshRing as a result of grabbing the DRI lock * before we've set up the ringbuffer, don't bother. */ - if (pI830->LpRing->mem == NULL) + if (!pI830->LpRing || !pI830->LpRing->mem) return; pI830->LpRing->head = INREG(LP_RING + RING_HEAD) & I830_HEAD_MASK; |