mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
Deal with font_buffer_create() failures
This commit is contained in:
parent
94f199e3c5
commit
bda48da68d
3 changed files with 42 additions and 12 deletions
|
|
@ -74,6 +74,11 @@ font_buffer_create(struct lab_data_buffer **buffer, int max_width,
|
|||
}
|
||||
/* TODO: scale */
|
||||
*buffer = buffer_create_cairo(rect.width, rect.height, 1, true);
|
||||
if (!*buffer) {
|
||||
wlr_log(WLR_ERROR, "Failed to create font buffer of size %dx%d",
|
||||
rect.width, rect.height);
|
||||
return;
|
||||
}
|
||||
|
||||
cairo_t *cairo = (*buffer)->cairo;
|
||||
cairo_surface_t *surf = cairo_get_target(cairo);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue