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>
This commit is contained in:
parent
50064164a4
commit
505ac6ddc6
|
@ -35,6 +35,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…
Reference in New Issue