Fix: use MEM_delete instead of MEM_free
This was missing in 1151d82df3.
This commit is contained in:
@@ -1447,7 +1447,7 @@ UserDef *BKE_blendfile_userdef_read_from_memory(const void *file_buf,
|
||||
userdef = bfd->user;
|
||||
}
|
||||
BKE_main_free(bfd->main);
|
||||
MEM_freeN(bfd);
|
||||
MEM_delete(bfd);
|
||||
}
|
||||
else {
|
||||
BKE_reports_prepend(reports, "Loading failed: ");
|
||||
@@ -1684,7 +1684,7 @@ WorkspaceConfigFileData *BKE_blendfile_workspace_config_read(const char *filepat
|
||||
workspace_config->workspaces = bfd->main->workspaces;
|
||||
}
|
||||
|
||||
MEM_freeN(bfd);
|
||||
MEM_delete(bfd);
|
||||
}
|
||||
|
||||
return workspace_config;
|
||||
|
||||
@@ -180,7 +180,7 @@ Main *BLO_memfile_main_get(MemFile *memfile, Main *bmain, Scene **r_scene)
|
||||
*r_scene = bfd->curscene;
|
||||
}
|
||||
|
||||
MEM_freeN(bfd);
|
||||
MEM_delete(bfd);
|
||||
}
|
||||
|
||||
return bmain_undo;
|
||||
|
||||
@@ -179,8 +179,7 @@ static Main *load_main_from_memory(const void *blend, int blend_size)
|
||||
bfd = BLO_read_from_memory(blend, blend_size, BLO_READ_SKIP_NONE, nullptr);
|
||||
if (bfd) {
|
||||
bmain = bfd->main;
|
||||
|
||||
MEM_freeN(bfd);
|
||||
MEM_delete(bfd);
|
||||
}
|
||||
G.fileflags = fileflags;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user