summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2014-08-27 21:49:50 -0700
committerJason Ekstrand <[email protected]>2014-09-01 12:31:56 -0700
commit1c573c9adbb8bb95bc10f6ade76a430684918160 (patch)
treecebb035fddc7dc6ff29815f12bfe4f3a99a8c6cb /src/mesa
parenta10c8db715baa8e12f5267ef2fc59dbb7d191f8d (diff)
i965/vec4: Don't segfault when debug-logging a null program
Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index acf0b6390bc..b247bf7532b 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1778,7 +1778,7 @@ vec4_visitor::run()
if (unlikely(INTEL_DEBUG & DEBUG_OPTIMIZER) && this_progress) { \
char filename[64]; \
snprintf(filename, 64, "%s-%04d-%02d-%02d-" #pass, \
- stage_name, shader_prog->Name, iteration, pass_num); \
+ stage_name, shader_prog ? shader_prog->Name : 0, iteration, pass_num); \
\
backend_visitor::dump_instructions(filename); \
} \
@@ -1790,7 +1790,7 @@ vec4_visitor::run()
if (unlikely(INTEL_DEBUG & DEBUG_OPTIMIZER)) {
char filename[64];
snprintf(filename, 64, "%s-%04d-00-start",
- stage_name, shader_prog->Name);
+ stage_name, shader_prog ? shader_prog->Name : 0);
backend_visitor::dump_instructions(filename);
}