- Previous commit broke selection of non-subsurf meshes :)
authorTon Roosendaal <ton@blender.org>
Wed, 29 Sep 2004 21:44:12 +0000 (21:44 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 29 Sep 2004 21:44:12 +0000 (21:44 +0000)
- fixed crash reported by SimonC on linked dupli meshes, editmode, set
  subsurf on, crash...

source/blender/src/buttons_editing.c
source/blender/src/drawobject.c

index e726bd1247010e493e06bfe7bfe52b092a01b895..c2c738b836f2e6660d7cf25f229ef9aee581a7ea 100644 (file)
@@ -1072,14 +1072,16 @@ void do_curvebuts(unsigned short event)
        case B_MAKEDISP:
                if(ob->type==OB_FONT) text_to_curve(ob, 0);
                makeDispList(ob);
-               /* we need signal to send to other users of same data to recalc... */
-               base= FIRSTBASE;
-               while(base) {
-                       if(base->lay & G.vd->lay) {
-                               if(base->object->data==ob->data && base->object!=ob)
-                                       makeDispList(base->object);
+               if(ob!=G.obedit) { // subsurf with linked dupli will crash
+                       /* we need signal to send to other users of same data to recalc... */
+                       base= FIRSTBASE;
+                       while(base) {
+                               if(base->lay & G.vd->lay) {
+                                       if(base->object->data==ob->data && base->object!=ob)
+                                               makeDispList(base->object);
+                               }
+                               base= base->next;
                        }
-                       base= base->next;
                }
                allqueue(REDRAWVIEW3D, 0);
                allqueue(REDRAWINFO, 1);        /* 1, because header->win==0! */
index 73255cc36f159a26ab34f4e043bbfdaf4b624345..01f1d5f356b6b1ede835a09db4b12d2e28432cd3 100644 (file)
@@ -4450,7 +4450,7 @@ static int bbs_mesh_solid(Object *ob, int facecol)
                        a++;    // the weird constructed loop ends with last drawn color...
                }
                else {
-                       
+                       a= 1;
                        glBegin(GL_QUADS);
                        glmode= GL_QUADS;
                        for(efa= G.editMesh->faces.first; efa; efa= efa->next, a++) {