Fix #21282: Segfault when using "Text on curve" option

Ignore textoncurve property if it's type isn't OB_CURVE, since
only curves could have a path.
This commit is contained in:
Sergey Sharybin
2010-03-13 11:22:39 +00:00
parent 8cae162245
commit 975cf38d6a

View File

@@ -960,7 +960,8 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
}
/* TEXT ON CURVE */
if(cu->textoncurve) {
/* Note: Only OB_CURVE objects could have a path */
if(cu->textoncurve && cu->textoncurve->type==OB_CURVE) {
Curve *cucu= cu->textoncurve->data;
int oldflag= cucu->flag;