Bugfix: when editing a Curve Guide, and deleting all but one control point,
authorTon Roosendaal <ton@blender.org>
Sat, 12 Nov 2005 11:58:37 +0000 (11:58 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 12 Nov 2005 11:58:37 +0000 (11:58 +0000)
the path code crashed.

source/blender/blenkernel/intern/effect.c

index 321c95bd1ed3396991a9ce2eaa0a19a41ea7275b..bbd3b9531b8a12bf05451625366a5cad4958a5d5 100644 (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);
                                                }