mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-27 02:20:16 +01:00
[cairo-boilerplate] Protect against the nil cairo_scaled_font_t
Beware the NULL pointer deference when trying to adjust the max glyph cache size...
This commit is contained in:
parent
b85920684f
commit
efd212bfa2
1 changed files with 3 additions and 0 deletions
|
|
@ -443,5 +443,8 @@ void
|
|||
cairo_boilerplate_scaled_font_set_max_glyphs_cached (cairo_scaled_font_t *scaled_font,
|
||||
int max_glyphs)
|
||||
{
|
||||
if (cairo_scaled_font_status (scaled_font))
|
||||
return;
|
||||
|
||||
scaled_font->glyphs->max_size = max_glyphs;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue