add missing mem-free on vertex group sorting & dont crash when calling fullscreen in bg mode.

This commit is contained in:
2011-03-22 11:19:02 +00:00
parent d2a721cfd5
commit 82d13ad999
2 changed files with 7 additions and 1 deletions

View File

@@ -2055,6 +2055,7 @@ static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op)
}
else {
BKE_report(op->reports, RPT_ERROR, "Editmode lattice isnt supported yet.");
MEM_freeN(sort_map_update);
return OPERATOR_CANCELLED;
}
}

View File

@@ -528,7 +528,12 @@ int wm_window_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
int wm_window_fullscreen_toggle_exec(bContext *C, wmOperator *UNUSED(op))
{
wmWindow *window= CTX_wm_window(C);
GHOST_TWindowState state = GHOST_GetWindowState(window->ghostwin);
GHOST_TWindowState state;
if(G.background)
return OPERATOR_CANCELLED;
state= GHOST_GetWindowState(window->ghostwin);
if(state!=GHOST_kWindowStateFullScreen)
GHOST_SetWindowState(window->ghostwin, GHOST_kWindowStateFullScreen);
else