summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/nouveau_mem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shared-core/nouveau_mem.c b/shared-core/nouveau_mem.c
index 0d590276..74636dc2 100644
--- a/shared-core/nouveau_mem.c
+++ b/shared-core/nouveau_mem.c
@@ -809,11 +809,11 @@ nouveau_ioctl_mem_free(struct drm_device *dev, void *data,
memfree->offset -= 512*1024*1024;
block=NULL;
- if (memfree->flags & NOUVEAU_MEM_FB)
+ if (dev_priv->fb_heap && memfree->flags & NOUVEAU_MEM_FB)
block = find_block(dev_priv->fb_heap, memfree->offset);
- else if (memfree->flags & NOUVEAU_MEM_AGP)
+ else if (dev_priv->agp_heap && memfree->flags & NOUVEAU_MEM_AGP)
block = find_block(dev_priv->agp_heap, memfree->offset);
- else if (memfree->flags & NOUVEAU_MEM_PCI)
+ else if (dev_priv->pci_heap && memfree->flags & NOUVEAU_MEM_PCI)
block = find_block(dev_priv->pci_heap, memfree->offset);
if (!block)
return -EFAULT;