mesa: fix conditional in save_Lightfv(), bug 18838
authorBrian <brian.paul@tungstengraphics.com>
Tue, 2 Dec 2008 01:32:47 +0000 (18:32 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 6 Jan 2009 16:04:31 +0000 (09:04 -0700)
(cherry picked from commit 1e2f57425153d73646fde7c91c16aa5559491556)

src/mesa/main/dlist.c

index ffe6dbfe08a925c2d317dc38e856787f043c8fb8..44341c5228e7e28fc4ccab6d9ab05e7ae0c057f7 100644 (file)
@@ -2002,7 +2002,7 @@ save_Lightfv(GLenum light, GLenum pname, const GLfloat *params)
    Node *n;
    ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
    n = ALLOC_INSTRUCTION(ctx, OPCODE_LIGHT, 6);
-   if (OPCODE_LIGHT) {
+   if (n) {
       GLint i, nParams;
       n[1].e = light;
       n[2].e = pname;