Bugfix: when editing a Curve Guide, and deleting all but one control point,

the path code crashed.
This commit is contained in:
Ton Roosendaal
2005-11-12 11:58:37 +00:00
parent c7c7ccccae
commit 6f045c44d3

View File

@@ -338,11 +338,10 @@ ListBase *pdInitEffectors(unsigned int layer)
if(ob->type==OB_CURVE) {
Curve *cu= ob->data;
if(cu->flag & CU_PATH) {
pEffectorCache *ec= MEM_callocN(sizeof(pEffectorCache), "effector cache");
if(cu->path==NULL || cu->path->data==NULL)
makeDispListCurveTypes(ob, 0);
if(cu->path && cu->path->data) {
pEffectorCache *ec= MEM_callocN(sizeof(pEffectorCache), "effector cache");
ec->ob= ob;
BLI_addtail(&listb, ec);
}