Bugfix #6167
authorTon Roosendaal <ton@blender.org>
Mon, 12 Mar 2007 16:27:20 +0000 (16:27 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 12 Mar 2007 16:27:20 +0000 (16:27 +0000)
Metaball delete could crash, if selected/active ball is not the 'mother'
ball.

source/blender/src/editobject.c

index 8a3950f184b51499d85026b58ad889921fc92e70..93159dc38e88909cd445c11cb987f27aed5ae60d 100644 (file)
@@ -2700,13 +2700,17 @@ void convertmenu(void)
                        }
                }
                base= base->next;
-               if(basedel != NULL && nr == 2)
+               if(basedel != NULL && nr == 2) {
+                       if(basedel==basact)
+                               basact= NULL;
                        free_and_unlink_base(basedel);  
+               }
                basedel = NULL;                         
        }
        
        /* texspace and normals */
        if(!basen) BASACT= base;
+
        enter_editmode(EM_WAITCURSOR);
        exit_editmode(EM_FREEDATA|EM_WAITCURSOR); /* freedata, but no undo */
        BASACT= basact;