mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
swaybar/bg: Fix crash on DPMS off
When turning off displays via DPMS, swaybar and swaybg still tried to render, but did not get a valid buffer, causing them to crash.
This commit is contained in:
parent
e0e31418d4
commit
c73a40555f
2 changed files with 6 additions and 0 deletions
|
|
@ -503,6 +503,9 @@ void render_frame(struct swaybar *bar, struct swaybar_output *output) {
|
|||
output->buffers,
|
||||
output->width * output->scale,
|
||||
output->height * output->scale);
|
||||
if (!output->current_buffer) {
|
||||
return;
|
||||
}
|
||||
cairo_t *shm = output->current_buffer->cairo;
|
||||
|
||||
cairo_save(shm);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue