summaryrefslogtreecommitdiffstats
path: root/src/gallium/tools/trace/model.py
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2013-07-01 12:05:57 +0100
committerJosé Fonseca <[email protected]>2013-07-01 12:05:57 +0100
commit0fd71ac9eb4fdcc181a4322f7c8244a858b5740d (patch)
tree482665f212ad7ea9604ce81d408f6b0a4e371958 /src/gallium/tools/trace/model.py
parentfa3040c117a998582eb04666ecbb32d3b77edf5c (diff)
tools/trace: Don't crash if a trace has no timing information.
Diffstat (limited to 'src/gallium/tools/trace/model.py')
-rwxr-xr-xsrc/gallium/tools/trace/model.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/tools/trace/model.py b/src/gallium/tools/trace/model.py
index 82aca6935bf..03bd74120b3 100755
--- a/src/gallium/tools/trace/model.py
+++ b/src/gallium/tools/trace/model.py
@@ -230,8 +230,9 @@ class PrettyPrinter:
if node.ret is not None:
self.formatter.text(' = ')
node.ret.visit(self)
- self.formatter.text(' // time ')
- node.time.visit(self)
+ if node.time is not None:
+ self.formatter.text(' // time ')
+ node.time.visit(self)
def visit_trace(self, node):
for call in node.calls: