Add a mechanism to abort a blend file reading on critical error - Blender 3.3 LTS #105486

Merged
Philipp Oeser merged 5 commits from mont29/blender:tmp-3.3-abort-fileread into blender-v3.3-release 2023-03-16 13:55:09 +01:00
1 changed files with 7 additions and 0 deletions
Showing only changes of commit 69c4d6f2a8 - Show all commits

View File

@ -39,6 +39,13 @@ Main *BKE_main_new(void)
void BKE_main_free(Main *mainvar)
{
/* In case this is called on a 'split-by-libraries' list of mains.
*
* Should not happen in typical usages, but can occur e.g. if a file reading is aborted. */
if (mainvar->next) {
BKE_main_free(mainvar->next);
}
/* also call when reading a file, erase all, etc */
ListBase *lbarray[INDEX_ID_MAX];
int a;