diff options
author | 2018-07-13 23:15:10 +0100 | |
---|---|---|
committer | 2018-07-13 23:15:10 +0100 | |
commit | 4e486a01bb08120b3b02b5fed381a569dea3219e (patch) | |
tree | 62c6576a23287a317c6169ac7873fdfbdca04aa7 /swaybg | |
parent | Merge pull request #2267 from emersion/simplify-popup-constraints (diff) | |
parent | swaybar/bg: Fix crash on DPMS off (diff) | |
download | sway-4e486a01bb08120b3b02b5fed381a569dea3219e.tar.gz sway-4e486a01bb08120b3b02b5fed381a569dea3219e.tar.zst sway-4e486a01bb08120b3b02b5fed381a569dea3219e.zip |
Merge pull request #2269 from minus7/swaybarbg-crash-on-dpms-resume
swaybar/bg: Fix crash on DPMS off
Diffstat (limited to 'swaybg')
-rw-r--r-- | swaybg/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/swaybg/main.c b/swaybg/main.c index 1796b245..f8e7e7ef 100644 --- a/swaybg/main.c +++ b/swaybg/main.c | |||
@@ -68,6 +68,9 @@ static void render_frame(struct swaybg_state *state) { | |||
68 | buffer_height = state->height * state->scale; | 68 | buffer_height = state->height * state->scale; |
69 | state->current_buffer = get_next_buffer(state->shm, | 69 | state->current_buffer = get_next_buffer(state->shm, |
70 | state->buffers, buffer_width, buffer_height); | 70 | state->buffers, buffer_width, buffer_height); |
71 | if (!state->current_buffer) { | ||
72 | return; | ||
73 | } | ||
71 | cairo_t *cairo = state->current_buffer->cairo; | 74 | cairo_t *cairo = state->current_buffer->cairo; |
72 | if (state->args->mode == BACKGROUND_MODE_SOLID_COLOR) { | 75 | if (state->args->mode == BACKGROUND_MODE_SOLID_COLOR) { |
73 | cairo_set_source_u32(cairo, state->context.color); | 76 | cairo_set_source_u32(cairo, state->context.color); |