summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/trace/tr_context.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c
index c8949729047..b69ed2cb526 100644
--- a/src/gallium/drivers/trace/tr_context.c
+++ b/src/gallium/drivers/trace/tr_context.c
@@ -1037,9 +1037,9 @@ struct pipe_context *
trace_context_create(struct pipe_screen *_screen,
struct pipe_context *pipe)
{
- struct trace_screen *tr_scr = trace_screen(_screen);
+ struct trace_screen *tr_scr;
struct trace_context *tr_ctx;
- struct pipe_screen *screen = tr_scr->screen;
+ struct pipe_screen *screen;
if(!pipe)
goto error1;
@@ -1047,6 +1047,9 @@ trace_context_create(struct pipe_screen *_screen,
if(!trace_dump_enabled())
goto error1;
+ tr_scr = trace_screen(_screen);
+ screen = tr_scr->screen;
+
tr_ctx = CALLOC_STRUCT(trace_context);
if(!tr_ctx)
goto error1;