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:
authorAlexander Ewering <blender@instinctive.de>2005-10-31 19:46:22 +0300
committerAlexander Ewering <blender@instinctive.de>2005-10-31 19:46:22 +0300
commitca85fc5c8a23bde409812fc137887fd1d09ec75f (patch)
tree65aae756ff3b9bcded4621758053c41a284d5498 /source/blender/blenkernel
parent4bf37a3ba52034582ad20734de6b3148995ae932 (diff)
Found a potential crash where NULL could be passed to vfont_get_data(),
here's the fix. Maybe it fixes Andy's file :)
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/font.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index fc8a3df9e6f..1b04a43ae28 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -409,11 +409,11 @@ static VFont *which_vfont(Curve *cu, CharInfo *info)
{
switch(info->flag & CU_STYLE) {
case CU_BOLD:
- return(cu->vfontb);
+ if (cu->vfontb) return(cu->vfontb); else return(cu->vfont);
case CU_ITALIC:
- return(cu->vfonti);
+ if (cu->vfonti) return(cu->vfonti); else return(cu->vfont);
case (CU_BOLD|CU_ITALIC):
- return(cu->vfontbi);
+ if (cu->vfontbi) return(cu->vfontbi); else return(cu->vfont);
default:
return(cu->vfont);
}