summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/savage
diff options
context:
space:
mode:
authorFelix Kuehling <[email protected]>2005-02-02 15:57:25 +0000
committerFelix Kuehling <[email protected]>2005-02-02 15:57:25 +0000
commiteba5b610b9d0c782e669efafa7ee1b785ce3254d (patch)
tree998756161700d7df17de3681d193747712dd29e3 /src/mesa/drivers/dri/savage
parent2eb9e67a5a53eeb386aaafb42e382c73c3873a4d (diff)
Check for heap == NULL before driSetTextureSwapCounterLocation.
Diffstat (limited to 'src/mesa/drivers/dri/savage')
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index 5592d0906a7..1ce8a4b88fd 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -379,8 +379,11 @@ savageCreateContext( const __GLcontextModes *mesaVis,
&imesa->swapped,
sizeof( savageTexObj ),
(destroy_texture_object_t *) savageDestroyTexObj );
- driSetTextureSwapCounterLocation( imesa->textureHeaps[i],
- & imesa->c_textureSwaps );
+ /* If textureSize[i] == 0 textureHeaps[i] is NULL. This can happen
+ * if there is not enough card memory for a card texture heap. */
+ if (imesa->textureHeaps[i])
+ driSetTextureSwapCounterLocation( imesa->textureHeaps[i],
+ & imesa->c_textureSwaps );
}
imesa->texture_depth = driQueryOptioni (&imesa->optionCache,
"texture_depth");