Skip to content

Commit

Permalink
Avoid creating zero-sized textures for marks
Browse files Browse the repository at this point in the history
Same as 6327f1b ("Avoid creating zero-sized textures for titlebars")
but for marks.
  • Loading branch information
emersion committed Apr 20, 2021
1 parent 3173a4f commit e3e99d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sway/tree/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -1623,6 +1623,10 @@ static void update_marks_texture(struct sway_container *con,
"%s", buffer);
cairo_destroy(c);

if (width == 0 || height == 0) {
return;
}

cairo_surface_t *surface = cairo_image_surface_create(
CAIRO_FORMAT_ARGB32, width, height);
cairo_t *cairo = cairo_create(surface);
Expand Down

0 comments on commit e3e99d9

Please sign in to comment.