summaryrefslogtreecommitdiff
path: root/src/bin/evas/evas_cserve2_fonts.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/evas/evas_cserve2_fonts.c')
-rw-r--r--src/bin/evas/evas_cserve2_fonts.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bin/evas/evas_cserve2_fonts.c b/src/bin/evas/evas_cserve2_fonts.c
index ed0698cbaf..b9da989d28 100644
--- a/src/bin/evas/evas_cserve2_fonts.c
+++ b/src/bin/evas/evas_cserve2_fonts.c
@@ -335,7 +335,7 @@ _font_slave_glyph_render(Font_Info *fi, Slave_Msg_Font_Glyphs_Loaded *response,
335 if (!glyphsize) 335 if (!glyphsize)
336 { 336 {
337 FT_Done_Glyph(glyph); 337 FT_Done_Glyph(glyph);
338 return EINA_FALSE; 338 goto on_error;
339 } 339 }
340 340
341 buffer_id = cserve2_shared_mempool_buffer_new(response->mempool, glyphsize); 341 buffer_id = cserve2_shared_mempool_buffer_new(response->mempool, glyphsize);
@@ -343,7 +343,7 @@ _font_slave_glyph_render(Font_Info *fi, Slave_Msg_Font_Glyphs_Loaded *response,
343 if (!data) 343 if (!data)
344 { 344 {
345 FT_Done_Glyph(glyph); 345 FT_Done_Glyph(glyph);
346 return EINA_FALSE; 346 goto on_error;
347 } 347 }
348 memcpy(data, bglyph->bitmap.buffer, glyphsize); 348 memcpy(data, bglyph->bitmap.buffer, glyphsize);
349 349
@@ -363,6 +363,13 @@ _font_slave_glyph_render(Font_Info *fi, Slave_Msg_Font_Glyphs_Loaded *response,
363 FT_Done_Glyph(glyph); 363 FT_Done_Glyph(glyph);
364 364
365 return EINA_TRUE; 365 return EINA_TRUE;
366
367on_error:
368 // Create invalid entry for this index.
369 memset(&response->glyphs[response->nglyphs], 0, sizeof(Slave_Msg_Glyph));
370 response->glyphs[response->nglyphs].index = idx;
371 response->nglyphs++;
372 return EINA_FALSE;
366} 373}
367 374
368static void 375static void