mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 01:41:30 +00:00
Check return value of wlr_renderer_begin()
Since [1], wlr_renderer_begin() can fail. Check its return value
and bail.
This fixes an assertion error (when begin() fails and then we try
to render something) after a GPU reset.
[1]: a541c9510a
This commit is contained in:
parent
a7b9f6fedc
commit
36f627d0fa
|
@ -1044,7 +1044,9 @@ void output_render(struct sway_output *output, struct timespec *when,
|
||||||
fullscreen_con = workspace->current.fullscreen;
|
fullscreen_con = workspace->current.fullscreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_renderer_begin(renderer, wlr_output->width, wlr_output->height);
|
if (!wlr_renderer_begin(renderer, wlr_output->width, wlr_output->height)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (debug.damage == DAMAGE_RERENDER) {
|
if (debug.damage == DAMAGE_RERENDER) {
|
||||||
int width, height;
|
int width, height;
|
||||||
|
|
Loading…
Reference in a new issue