coverity issue CID: 523

Checker: UNINIT (help)
File: base/src/source/blender/blenlib/intern/freetypefont.c
Function: objchr_to_ftvfontdata
Description: Using uninitialized value "face" in call to function "freetypechar_to_vchar"

freetypechar_to_vchar expects face to be defined so we need to
return before then if we have a problem.  Also it doesn't
make sense to not return FALSE if there is an error because we
didn't do anything.

Kent
This commit is contained in:
Kent Mein 2009-06-13 03:08:58 +00:00
parent 8ef87d8b4f
commit 03de57c6d5

@ -301,9 +301,12 @@ int objchr_to_ftvfontdata(VFont *vfont, FT_ULong charcode)
tf->pf->size,
0,
&face);
if (err) return FALSE;
}
else {
err = TRUE;
return FALSE;
}
else
err= TRUE;
// Read the char
freetypechar_to_vchar(face, charcode, vfont->data);