wm menu freeing was using freed memory, bone-parent names were being set to "" on...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 9 Oct 2009 12:34:37 +0000 (12:34 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 9 Oct 2009 12:34:37 +0000 (12:34 +0000)
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/windowmanager/intern/wm.c

index 2ce7da4..b5a0ca0 100644 (file)
@@ -1135,7 +1135,6 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
        }
        else {
                if((ob->mode & OB_MODE_PARTICLE_EDIT)==0) {
-                       strcpy(ob->parsubstr, "");
                        uiBlockEndAlign(block);
                }
        }
index dbb8fc4..5b7f892 100644 (file)
@@ -162,13 +162,17 @@ void WM_menutype_freelink(MenuType* mt)
 
 void WM_menutype_free(void)
 {
-       MenuType* mt;
+       MenuType* mt= menutypes.first, *mt_next;
+
+       while(mt) {
+               mt_next= mt->next;
 
-       for(mt= menutypes.first; mt; mt= mt->next) {
-               if(mt->ext.free) {
+               if(mt->ext.free)
                        mt->ext.free(mt->ext.data);
-               }
+
                WM_menutype_freelink(mt);
+
+               mt= mt_next;
        }
 }