summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shared-core/i915_dma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index 407befcc..1e493e38 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -1060,6 +1060,10 @@ void i915_driver_lastclose(struct drm_device * dev)
{
drm_i915_private_t *dev_priv = dev->dev_private;
+ /* agp off can use this to get called before dev_priv */
+ if (!dev_priv)
+ return;
+
#ifdef I915_HAVE_BUFFER
if (dev_priv->val_bufs) {
vfree(dev_priv->val_bufs);