mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-04 20:55:58 +01:00
render/gles2: Handle NULL timer
This commit is contained in:
parent
e0424b24f6
commit
398c6b66c6
1 changed files with 5 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue