summaryrefslogtreecommitdiff
path: root/src/i830_memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i830_memory.c')
-rw-r--r--src/i830_memory.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 9cf14e4e..3ae10cfb 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -324,7 +324,13 @@ static unsigned long
i830_get_gtt_physical(ScrnInfoPtr pScrn, unsigned long offset)
{
I830Ptr pI830 = I830PTR(pScrn);
- CARD32 gttentry = INGTT(offset / 1024);
+ CARD32 gttentry;
+
+ /* We don't have GTTBase set up on i830 yet. */
+ if (pI830->GTTBase == NULL)
+ return -1;
+
+ gttentry = INGTT(offset / 1024);
/* Mask out these reserved bits on this hardware. */
if (!IS_I965G(pI830))