Fixed crash caused by new (strict) rule for displists. Reminder: to signal
authorTon Roosendaal <ton@blender.org>
Fri, 17 Sep 2004 10:36:43 +0000 (10:36 +0000)
committerTon Roosendaal <ton@blender.org>
Fri, 17 Sep 2004 10:36:43 +0000 (10:36 +0000)
that a displist has to be recalculated, you only have to free it.

In the init_render_mesh() not all situations were checked OK.
Thanks Basse for finding it!

source/blender/renderconverter/intern/convertBlenderScene.c

index be5c04c3c7f0dfb2de03b99e092556c9828316e1..a022db0d3a2445e108cf58c2bf718d6f9e12d389 100644 (file)
@@ -1249,7 +1249,7 @@ static void init_render_mesh(Object *ob)
 
        /* object_deform changes imat! */
        do_puno= mesh_modifier(ob, 's');
-
+       
        paf = give_parteff(ob);
        if(paf) {
                if(paf->flag & PAF_STATIC) render_static_particle_system(ob, paf);
@@ -1294,9 +1294,9 @@ static void init_render_mesh(Object *ob)
 
                /* Force a displist rebuild if this is a subsurf and we have a different subdiv level */
 
-               if((dl==0) || ((me->subdiv != me->subdivr))) {
+               if((dl==NULL) || ((me->subdiv != me->subdivr))) {
                        /* prevent subsurf called again for duplicate use of mesh, tface pointers change */
-                       if((me->subdivdone-1)!=me->subdivr) {
+                       if(dl==NULL || (me->subdivdone-1)!=me->subdivr) {
                                DispList *dlVerts;
 
                                dlVerts= find_displist(&ob->disp, DL_VERTS);