Workspace: Call BKE_viewrender_free from the right place

We should call it when we free the workspace, not when removing it.
Patch by Julian Eisel.
This commit is contained in:
Dalai Felinto 2017-10-16 17:52:49 -02:00
parent e4f2b2be26
commit eae622d2dd
1 changed files with 1 additions and 2 deletions

View File

@ -154,6 +154,7 @@ void BKE_workspace_free(WorkSpace *workspace)
}
BLI_freelistN(&workspace->layouts);
BLI_freelistN(&workspace->transform_orientations);
BKE_viewrender_free(&workspace->view_render);
}
void BKE_workspace_remove(Main *bmain, WorkSpace *workspace)
@ -162,8 +163,6 @@ void BKE_workspace_remove(Main *bmain, WorkSpace *workspace)
layout_next = layout->next;
BKE_workspace_layout_remove(bmain, workspace, layout);
}
BKE_viewrender_free(&workspace->view_render);
BKE_libblock_free(bmain, workspace);
}