mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-11-15 19:47:57 +01: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
1 changed files with 3 additions and 1 deletions
|
@ -1044,7 +1044,9 @@ void output_render(struct sway_output *output, struct timespec *when,
|
|||
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) {
|
||||
int width, height;
|
||||
|
|
Loading…
Reference in a new issue