summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/driver_trace
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2018-07-12 16:29:51 +0200
committerMichel Dänzer <[email protected]>2018-07-12 17:39:12 +0200
commit34e89e4d3802ec9b4d7da178757bd82c44310653 (patch)
tree8f3ba9ecd6a527804c22e069c5a4476b1a04b1c0 /src/gallium/auxiliary/driver_trace
parentc2587ac4e58353657c3a38e259bc55ee1216716e (diff)
gallium: Check pipe_screen::resource_changed before dereferencing it
It's optional, only implemented by the etnaviv driver so far. Fixes: 501d0edeca32 "st/mesa: call resource_changed when binding a EGLImage to a texture" Fixes: a37cf630b4d1 "gallium: add pipe_screen::resource_changed callback wrappers" Reviewed-by: Lucas Stach <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/driver_trace')
-rw-r--r--src/gallium/auxiliary/driver_trace/tr_screen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/driver_trace/tr_screen.c b/src/gallium/auxiliary/driver_trace/tr_screen.c
index d5a81249b51..704b2a3c72d 100644
--- a/src/gallium/auxiliary/driver_trace/tr_screen.c
+++ b/src/gallium/auxiliary/driver_trace/tr_screen.c
@@ -444,7 +444,8 @@ trace_screen_resource_changed(struct pipe_screen *_screen,
trace_dump_arg(ptr, screen);
trace_dump_arg(ptr, resource);
- screen->resource_changed(screen, resource);
+ if (screen->resource_changed)
+ screen->resource_changed(screen, resource);
trace_dump_call_end();
}