Changing loopcut count caused memory errors in some cases due to missing null check.
authorJanne Karhu <jhkarh@gmail.com>
Fri, 24 Sep 2010 10:49:29 +0000 (10:49 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Fri, 24 Sep 2010 10:49:29 +0000 (10:49 +0000)
source/blender/editors/mesh/loopcut.c

index 174207a71c50548cf79f974f918abb2ee84fa1d6..13538a6f218881a8fddbe35cb44e2ac55e5b32df 100644 (file)
@@ -252,7 +252,7 @@ static void ringsel_find_edge(tringselOpData *lcd, const bContext *C, ARegion *a
 {
        if (lcd->eed) {
                edgering_sel(lcd, cuts, 0);
-       } else {
+       } else if(lcd->edges) {
                MEM_freeN(lcd->edges);
                lcd->edges = NULL;
                lcd->totedge = 0;