i965/blorp: Get rid of the blorp_prog_data_int() helper
[mesa.git] / src / mesa / drivers / dri / i965 / brw_dead_control_flow.cpp
index 345149287edfbdc01d9d69268f8ecba904583a4f..114dc6cb21240da5f3982160d27f8a2c151ac9d0 100644 (file)
@@ -32,7 +32,7 @@
 /* Look for and eliminate dead control flow:
  *
  *   - if/endif
- *   . else in else/endif
+ *   - else in else/endif
  *   - then in if/else/endif
  */
 bool
@@ -42,6 +42,10 @@ dead_control_flow_eliminate(backend_shader *s)
 
    foreach_block_safe (block, s->cfg) {
       bblock_t *prev_block = block->prev();
+
+      if (!prev_block)
+         continue;
+
       backend_instruction *const inst = block->start();
       backend_instruction *const prev_inst = prev_block->end();