draw/llvm: add additional null pointer checkin draw_pt_fetch_pipeline_or_emit_llvm()
authorBrian Paul <brianp@vmware.com>
Thu, 22 Sep 2011 16:29:58 +0000 (10:29 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 23 Sep 2011 13:58:44 +0000 (07:58 -0600)
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c

index ac839682331e7016a687bbfa07dc1d3a04818477..2a3fb89884c61f705d947d5089869d8c1bd5c13c 100644 (file)
@@ -430,7 +430,7 @@ draw_pt_fetch_pipeline_or_emit_llvm(struct draw_context *draw)
 {
    struct llvm_middle_end *fpme = 0;
 
-   if (!draw->llvm->gallivm->engine)
+   if (!draw->llvm || !draw->llvm->gallivm->engine)
       return NULL;
 
    fpme = CALLOC_STRUCT( llvm_middle_end );