mirror of
https://github.com/NickHu/sway
synced 2025-01-28 07:58:22 +01:00
swaybar: fix cairo_font_options leak
This commit is contained in:
parent
a47f8ef478
commit
83310f5abf
1 changed files with 2 additions and 3 deletions
|
@ -813,9 +813,7 @@ void render_frame(struct swaybar_output *output) {
|
||||||
output->width * output->scale,
|
output->width * output->scale,
|
||||||
output->height * output->scale);
|
output->height * output->scale);
|
||||||
if (!output->current_buffer) {
|
if (!output->current_buffer) {
|
||||||
cairo_surface_destroy(recorder);
|
goto cleanup;
|
||||||
cairo_destroy(cairo);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
cairo_t *shm = output->current_buffer->cairo;
|
cairo_t *shm = output->current_buffer->cairo;
|
||||||
|
|
||||||
|
@ -840,6 +838,7 @@ void render_frame(struct swaybar_output *output) {
|
||||||
wl_surface_commit(output->surface);
|
wl_surface_commit(output->surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cleanup:
|
||||||
if (ctx.textaa_sharp != ctx.textaa_safe) {
|
if (ctx.textaa_sharp != ctx.textaa_safe) {
|
||||||
cairo_font_options_destroy(ctx.textaa_sharp);
|
cairo_font_options_destroy(ctx.textaa_sharp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue