added null pointer check in tnl_copy_to_current()
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 11 Jun 2003 18:48:54 +0000 (18:48 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 11 Jun 2003 18:48:54 +0000 (18:48 +0000)
src/mesa/tnl/t_imm_exec.c

index da44ca14feb5b7dd4d7b166fd1afdb413f834249..0fec5d4cd446ce91c3ab7d8aa3fd3fe745924baf 100644 (file)
@@ -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]);
       }
    }