summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/evas/cache2/evas_cache2.c2
-rw-r--r--src/lib/evas/cserve2/evas_cs2_client.c19
2 files changed, 15 insertions, 6 deletions
diff --git a/src/lib/evas/cache2/evas_cache2.c b/src/lib/evas/cache2/evas_cache2.c
index e1a9d01120..35cceb6e65 100644
--- a/src/lib/evas/cache2/evas_cache2.c
+++ b/src/lib/evas/cache2/evas_cache2.c
@@ -657,7 +657,7 @@ evas_cache2_image_open(Evas_Cache2 *cache, const char *path, const char *key,
657 Image_Timestamp tstamp; 657 Image_Timestamp tstamp;
658 Evas_Image_Load_Opts prevent; 658 Evas_Image_Load_Opts prevent;
659 659
660 if ((!path) || ((!path) && (!key))) 660 if (!path)
661 { 661 {
662 *error = EVAS_LOAD_ERROR_GENERIC; 662 *error = EVAS_LOAD_ERROR_GENERIC;
663 return NULL; 663 return NULL;
diff --git a/src/lib/evas/cserve2/evas_cs2_client.c b/src/lib/evas/cserve2/evas_cs2_client.c
index 67c597a0cf..5410b0b212 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -545,7 +545,7 @@ _server_dispatch(Eina_Bool *failed)
545 Eina_List *l, *l_next; 545 Eina_List *l, *l_next;
546 Client_Request *cr; 546 Client_Request *cr;
547 Msg_Base *msg; 547 Msg_Base *msg;
548 Eina_Bool found; 548 Eina_Bool found = EINA_FALSE;
549 549
550 msg = _server_read(&size); 550 msg = _server_read(&size);
551 if (!msg) 551 if (!msg)
@@ -1691,8 +1691,9 @@ _glyph_map_remap_check(Glyph_Map *map, const char *idxpath, const char *datapath
1691 // Note: Since the shm name contains cserve2's PID it should most likely 1691 // Note: Since the shm name contains cserve2's PID it should most likely
1692 // always change in case of crash/restart 1692 // always change in case of crash/restart
1693 1693
1694 if ((datapath && strcmp(datapath, map->mempool.path)) 1694 if (datapath && idxpath &&
1695 || (idxpath && strcmp(idxpath, map->index.path))) 1695 ((strncmp(datapath, map->mempool.path, SHARED_BUFFER_PATH_MAX) != 0) ||
1696 (strncmp(idxpath, map->index.path, SHARED_BUFFER_PATH_MAX) != 0)))
1696 { 1697 {
1697 CS_Glyph_Out *gl, *cursor; 1698 CS_Glyph_Out *gl, *cursor;
1698 1699
@@ -1735,7 +1736,13 @@ _glyph_map_remap_check(Glyph_Map *map, const char *idxpath, const char *datapath
1735 else 1736 else
1736 { 1737 {
1737 gl->sb = oldbuf; 1738 gl->sb = oldbuf;
1738 EINA_REFCOUNT_REF(gl->sb); 1739 if (gl->sb)
1740 EINA_REFCOUNT_REF(gl->sb);
1741 else
1742 {
1743 ERR("Glyph pool can not be remapped! (invalid refs)");
1744 eina_clist_remove(&gl->map_entry);
1745 }
1739 } 1746 }
1740 } 1747 }
1741 1748
@@ -1824,11 +1831,13 @@ _font_entry_glyph_map_rebuild_check(Font_Entry *fe, Font_Hint_Flags hints)
1824 if (!idxpath || !datapath) return -1; 1831 if (!idxpath || !datapath) return -1;
1825 1832
1826 fe->map =_glyph_map_open(fe, idxpath, datapath); 1833 fe->map =_glyph_map_open(fe, idxpath, datapath);
1834 if (!fe->map) return -1;
1835
1827 changed = EINA_TRUE; 1836 changed = EINA_TRUE;
1828 } 1837 }
1829 1838
1830 changed |= _glyph_map_remap_check(fe->map, idxpath, datapath); 1839 changed |= _glyph_map_remap_check(fe->map, idxpath, datapath);
1831 if (changed && fe->map && fe->map->index.data && fe->map->mempool.data) 1840 if (changed && fe->map->index.data && fe->map->mempool.data)
1832 { 1841 {
1833 CS_Glyph_Out *gl; 1842 CS_Glyph_Out *gl;
1834 const Glyph_Data *gd; 1843 const Glyph_Data *gd;