diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-06-06 02:17:10 -0400 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-06-06 02:17:10 -0400 |
commit | 398c6b66c6a3391bbbd07bb66a5ce239d2ff79ec (patch) | |
tree | ad1e93fd0d0b901ac73e0d98bf1080fec348ce1d /render/gles2 | |
parent | e0424b24f670de0552ca23cb3917808b780069c7 (diff) |
render/gles2: Handle NULL timer
Diffstat (limited to 'render/gles2')
-rw-r--r-- | render/gles2/renderer.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index 13ed2af0..6631348e 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -557,8 +557,11 @@ static struct wlr_render_pass *gles2_begin_buffer_pass(struct wlr_renderer *wlr_ return NULL; } - struct wlr_gles2_render_timer *timer = gles2_get_render_timer(options->timer); - clock_gettime(CLOCK_MONOTONIC, &timer->cpu_start); + struct wlr_gles2_render_timer *timer = NULL; + if (options->timer) { + timer = gles2_get_render_timer(options->timer); + clock_gettime(CLOCK_MONOTONIC, &timer->cpu_start); + } struct wlr_gles2_buffer *buffer = get_or_create_buffer(renderer, wlr_buffer); if (!buffer) { |