Check for heap == NULL before driSetTextureSwapCounterLocation.

This commit is contained in:
Felix Kuehling 2005-02-02 15:57:25 +00:00
parent 2eb9e67a5a
commit eba5b610b9
1 changed files with 5 additions and 2 deletions

View File

@ -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");