Skip to content

Commit

Permalink
Don't try to access i915-perf data if no file was given
Browse files Browse the repository at this point in the history
With USE_I915_PERF=1, if the user opens a .dat file without a
.i915-dat one, we run into a segfault... Oopsie
  • Loading branch information
llandwerlin-intel authored and mikesart committed Nov 23, 2020
1 parent e9a1f2c commit 78ff08e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gpuvis_i915_perfcounters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ void I915PerfCounters::init( TraceEvents &trace_events )

m_counters.clear();

if (!m_trace_events->i915_perf_reader)
return;

const struct intel_perf_metric_set *metric_set =
m_trace_events->i915_perf_reader->metric_set;

Expand Down

0 comments on commit 78ff08e

Please sign in to comment.