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:
authorCampbell Barton <ideasman42@gmail.com>2011-10-12 03:08:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-12 03:08:17 +0400
commit4750f24663cc4077861de80a38dcd21af781f30d (patch)
tree1d6a295977937272be7a85cc98b494431bac3dd5 /source/blender/blenkernel/intern/font.c
parent6b2dd62c64638b97ae9b3164a69dc143a31447cd (diff)
fix for crash caused by invalid active material index while editing text.
also added some better error checking in object_remove_material_slot() so it will print an error rather then crashing if this case ever happens again.
Diffstat (limited to 'source/blender/blenkernel/intern/font.c')
-rw-r--r--source/blender/blenkernel/intern/font.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 4c8d0cf998d..9c01b35b91a 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -546,7 +546,7 @@ static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo
nu2->knotsu = nu2->knotsv = NULL;
nu2->flag= CU_SMOOTH;
nu2->charidx = charidx;
- if (info->mat_nr) {
+ if (info->mat_nr > 0) {
nu2->mat_nr= info->mat_nr-1;
}
else {