[Mesa-dev] [PATCH] mesa/main: In _mesa_CompressedTextureSubImage3D() check found texObj
Laura Ekstrand
laura at jlekstrand.net
Mon Jan 12 09:45:32 PST 2015
Looks correct.
Reviewed-by: Laura Ekstrand <laura at jlekstrand.net>
On Mon, Jan 12, 2015 at 5:27 AM, Juha-Pekka Heikkila <
juhapekka.heikkila at gmail.com> wrote:
> Check returned texObj is not null. If texObj is null there is already
> GL_INVALID_OPERATION error set.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> ---
> src/mesa/main/teximage.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 4fa7f0f..5ada94f 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -4732,6 +4732,8 @@ _mesa_CompressedTextureSubImage3D(GLuint texture,
> GLint level, GLint xoffset,
>
> texObj = _mesa_lookup_texture_err(ctx, texture,
> "glCompressedTextureSubImage3D");
> + if (!texObj)
> + return;
>
> _mesa_compressed_texture_sub_image(ctx, 3, texObj, texObj->Target,
> level,
> xoffset, yoffset, zoffset,
> --
> 2.0.0.rc4.1.g4a28f16
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150112/8fb437a3/attachment.html>
More information about the mesa-dev
mailing list