summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/trace/tr_dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/trace/tr_dump.c')
-rw-r--r--src/gallium/drivers/trace/tr_dump.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/trace/tr_dump.c b/src/gallium/drivers/trace/tr_dump.c
index 30c0986363..0591b9fc33 100644
--- a/src/gallium/drivers/trace/tr_dump.c
+++ b/src/gallium/drivers/trace/tr_dump.c
@@ -322,8 +322,16 @@ void trace_dump_member_end(struct trace_stream *stream)
trace_dump_write(stream, "</member>");
}
+void trace_dump_null(struct trace_stream *stream)
+{
+ trace_dump_write(stream, "<null/>");
+}
+
void trace_dump_ptr(struct trace_stream *stream,
const void *value)
{
- trace_dump_writef(stream, "<ptr>%p</ptr>", value);
+ if(value)
+ trace_dump_writef(stream, "<ptr>%p</ptr>", value);
+ else
+ trace_dump_null(stream);
}