diff options
author | Jason Ekstrand <[email protected]> | 2014-08-29 11:23:55 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2014-09-01 12:33:13 -0700 |
commit | e8f83538dd4203befe63998b703afd2b488ad56a (patch) | |
tree | 80245f45781026be1f00a13040ccb9a9ee22939f | |
parent | 1c573c9adbb8bb95bc10f6ade76a430684918160 (diff) |
i965/fs: Don't segfault when debug-logging a null program
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 268f52891c2..ac6b1060ecf 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -3234,7 +3234,7 @@ fs_visitor::run() if (unlikely(INTEL_DEBUG & DEBUG_OPTIMIZER) && this_progress) { \ char filename[64]; \ snprintf(filename, 64, "fs%d-%04d-%02d-%02d-" #pass, \ - dispatch_width, shader_prog->Name, iteration, pass_num); \ + dispatch_width, shader_prog ? shader_prog->Name : 0, iteration, pass_num); \ \ backend_visitor::dump_instructions(filename); \ } \ @@ -3245,7 +3245,7 @@ fs_visitor::run() if (unlikely(INTEL_DEBUG & DEBUG_OPTIMIZER)) { char filename[64]; snprintf(filename, 64, "fs%d-%04d-00-start", - dispatch_width, shader_prog->Name); + dispatch_width, shader_prog ? shader_prog->Name : 0); backend_visitor::dump_instructions(filename); } |