Mesa (master): draw: init draw->pt.middle.general = NULL just to be safe

Brian Paul brianp at kemper.freedesktop.org
Wed Apr 7 13:12:34 UTC 2010


Module: Mesa
Branch: master
Commit: 78fd65fd2c9b537b88bf35454b98323029ee1bb3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=78fd65fd2c9b537b88bf35454b98323029ee1bb3

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Apr  7 07:09:52 2010 -0600

draw: init draw->pt.middle.general = NULL just to be safe

This field should be null from the initial calloc() of the draw context,
but let's be safe (and improve understanding of the code).

---

 src/gallium/auxiliary/draw/draw_pt.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c
index b7a9982..a60a3b2 100644
--- a/src/gallium/auxiliary/draw/draw_pt.c
+++ b/src/gallium/auxiliary/draw/draw_pt.c
@@ -142,6 +142,8 @@ boolean draw_pt_init( struct draw_context *draw )
 
 #if DRAW_LLVM
    draw->pt.middle.general = draw_pt_fetch_pipeline_or_emit_llvm( draw );
+#else
+   draw->pt.middle.general = NULL;
 #endif
 
    if (!draw->pt.middle.general)




More information about the mesa-commit mailing list