cancelling bake wasn't freeing the bake mask.
This commit is contained in:
@@ -189,9 +189,18 @@ static void finish_bake_internal(BakeRender *bkr)
|
||||
for(ima= G.main->image.first; ima; ima= ima->id.next) {
|
||||
if(ima->ok==IMA_OK_LOADED) {
|
||||
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
|
||||
if(ibuf && (ibuf->userflags & IB_BITMAPDIRTY)) {
|
||||
GPU_free_image(ima);
|
||||
imb_freemipmapImBuf(ibuf);
|
||||
if(ibuf) {
|
||||
if(ibuf->userflags & IB_BITMAPDIRTY) {
|
||||
GPU_free_image(ima);
|
||||
imb_freemipmapImBuf(ibuf);
|
||||
}
|
||||
|
||||
/* freed when baking is done, but if its canceled we need to free here */
|
||||
if (ibuf->userdata) {
|
||||
printf("freed\n");
|
||||
MEM_freeN(ibuf->userdata);
|
||||
ibuf->userdata= NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user