mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
intel: Don't dereference a NULL pointer of calloc fails
The caller of NewTextureObject does the right thing if NULL is returned,
so this function should do the right thing too.
NOTE: This is a candidate for stable branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 505ac6ddc6)
This commit is contained in:
parent
9ef8b94e22
commit
1665f29c29
1 changed files with 4 additions and 0 deletions
|
|
@ -34,6 +34,10 @@ intelNewTextureObject(struct gl_context * ctx, GLuint name, GLenum target)
|
|||
(void) ctx;
|
||||
|
||||
DBG("%s\n", __FUNCTION__);
|
||||
|
||||
if (obj == NULL)
|
||||
return NULL;
|
||||
|
||||
_mesa_initialize_texture_object(&obj->base, name, target);
|
||||
|
||||
obj->needs_validate = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue