Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Mein <mein@cs.umn.edu>2009-06-13 07:08:58 +0400
committerKent Mein <mein@cs.umn.edu>2009-06-13 07:08:58 +0400
commit03de57c6d5a72b30014ed7753525af1df4feba93 (patch)
tree80566e7ecabbc81a645910cb6dafaab7a86e0308 /source/blender/blenlib/intern/freetypefont.c
parent8ef87d8b4fac12fab14ace4275703b6ff24f45af (diff)
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
Diffstat (limited to 'source/blender/blenlib/intern/freetypefont.c')
-rw-r--r--source/blender/blenlib/intern/freetypefont.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c
index a97f2460ba1..da415377073 100644
--- a/source/blender/blenlib/intern/freetypefont.c
+++ b/source/blender/blenlib/intern/freetypefont.c
@@ -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);