[Mesa-dev] [PATCH 1/6] main: Check for NULL in texturesubimage.
Anuj Phogat
anuj.phogat at gmail.com
Tue Mar 3 16:15:55 PST 2015
On Fri, Feb 27, 2015 at 4:07 PM, Laura Ekstrand <laura at jlekstrand.net> wrote:
> ---
> 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 6e45cc9..dfad9ed 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -3688,6 +3688,8 @@ texturesubimage(struct gl_context *ctx, GLuint dims,
> /* Copy in each face. */
> for (i = 0; i < 6; ++i) {
> texImage = texObj->Image[i][level];
> + if (!texImage)
> + return;
This check is already done in _mesa_cube_level_complete(), failing which
causes invalid operation before returning. I think you should add
assert(texImage) here.
> _mesa_texture_sub_image(ctx, 3, texObj, texImage, texObj->Target,
> level, xoffset, yoffset, zoffset,
> width, height, 1, format,
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list