Commit 983d4358657e51d32c20b7fcfe7ceda5faaf62b9

Alexei Podtelezhnikov 2022-01-30T22:13:51

[cache] Fix fallouts from edd4fedc5427. Reported by Werner. * src/cache/ftcimage.c (FTC_INode_New): Always initialize FT_Glyph. * src/cache/ftcsbits.c (FTC_SNode_New): Always initialize FT_SBit.

diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c
index aec145c..cd43f75 100644
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -74,6 +74,7 @@
 
       /* initialize its inner fields */
       FTC_GNode_Init( gnode, gindex, family );
+      inode->glyph = NULL;
 
       /* we will now load the glyph image */
       error = clazz->family_load_glyph( family, gindex, cache,
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index c36b8ef..9f5cc23 100644
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -248,7 +248,9 @@
       snode->count = count;
       for ( node_count = 0; node_count < count; node_count++ )
       {
-        snode->sbits[node_count].width = 255;
+        snode->sbits[node_count].width  = 255;
+        snode->sbits[node_count].height = 0;
+        snode->sbits[node_count].buffer = NULL;
       }
 
       error = ftc_snode_load( snode,