From: Brian Paul Date: Wed, 11 Jun 2003 18:48:54 +0000 (+0000) Subject: added null pointer check in tnl_copy_to_current() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5ac9e660a65f4ab06120abbc20598a93a87ded49;p=mesa.git added null pointer check in tnl_copy_to_current() --- diff --git a/src/mesa/tnl/t_imm_exec.c b/src/mesa/tnl/t_imm_exec.c index da44ca14feb..0fec5d4cd44 100644 --- a/src/mesa/tnl/t_imm_exec.c +++ b/src/mesa/tnl/t_imm_exec.c @@ -135,7 +135,7 @@ void _tnl_copy_to_current( GLcontext *ctx, struct immediate *IM, _tnl_print_vert_flags("copy to current", flag); for (attr = 1; attr < VERT_ATTRIB_MAX; attr++) { - if (flag & (1 << attr)) { + if ((flag & (1 << attr)) && IM->Attrib[attr]) { COPY_4FV(ctx->Current.Attrib[attr], IM->Attrib[attr][count]); } }