diff options
-rw-r--r-- | src/bin/evas/evas_cserve2_fonts.c | 11 | ||||
-rw-r--r-- | src/bin/evas/evas_cserve2_main.c | 18 |
2 files changed, 18 insertions, 11 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 | |||
367 | on_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 | ||
368 | static void | 375 | static void |
diff --git a/src/bin/evas/evas_cserve2_main.c b/src/bin/evas/evas_cserve2_main.c index 1509a9cd07..fa70fece3b 100644 --- a/src/bin/evas/evas_cserve2_main.c +++ b/src/bin/evas/evas_cserve2_main.c | |||
@@ -24,15 +24,15 @@ cserve2_client_error_send(Client *client, unsigned int rid, int error_code) | |||
24 | int size; | 24 | int size; |
25 | Msg_Error msg; | 25 | Msg_Error msg; |
26 | 26 | ||
27 | // clear the struct with possible paddings, since it is not aligned. | 27 | // clear the struct with possible paddings, since it is not aligned. |
28 | memset(&msg, 0, sizeof(msg)); | 28 | memset(&msg, 0, sizeof(msg)); |
29 | msg.base.rid = rid; | 29 | msg.base.rid = rid; |
30 | msg.base.type = CSERVE2_ERROR; | 30 | msg.base.type = CSERVE2_ERROR; |
31 | msg.error = error_code; | 31 | msg.error = error_code; |
32 | 32 | ||
33 | size = sizeof(msg); | 33 | size = sizeof(msg); |
34 | cserve2_client_send(client, &size, sizeof(size)); | 34 | cserve2_client_send(client, &size, sizeof(size)); |
35 | cserve2_client_send(client, &msg, sizeof(msg)); | 35 | cserve2_client_send(client, &msg, sizeof(msg)); |
36 | } | 36 | } |
37 | 37 | ||
38 | void | 38 | void |