draw: Avoid NULL pointer dereference when binding NULL fragment shaders.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 2 Feb 2012 13:19:56 +0000 (13:19 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 2 Feb 2012 14:45:30 +0000 (14:45 +0000)
commitedb19707951306447daef43c1ea3cacec5f211fb
treeccc12b60d2772c28b11ba4955d511fc8ca1081ed
parentefd73f72d8f34a40d6a1cd279fffa48dc13b6e5b
draw: Avoid NULL pointer dereference when binding NULL fragment shaders.

Now that the draw module avoids flushing, it may flush precisely when
binding a NULL shader, so care must be taken when restoring the original
fragment shader.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/draw/draw_pipe_aaline.c
src/gallium/auxiliary/draw/draw_pipe_aapoint.c
src/gallium/auxiliary/draw/draw_pipe_pstipple.c