From 2be1e5aa97ef13dbdc539754c7467b0108cda174 Mon Sep 17 00:00:00 2001 From: Chris Clyne Date: Wed, 15 Nov 2023 03:21:15 +0000 Subject: [PATCH] fix versioning crash with older files --- source/blender/blenloader/intern/versioning_400.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/blender/blenloader/intern/versioning_400.cc b/source/blender/blenloader/intern/versioning_400.cc index eed551712d5..cabfb453a0f 100644 --- a/source/blender/blenloader/intern/versioning_400.cc +++ b/source/blender/blenloader/intern/versioning_400.cc @@ -1188,6 +1188,16 @@ static void versioning_grease_pencil_stroke_radii_scaling(GreasePencil *grease_p void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain) { + /* Goo engine version warning script - remove if it exists. */ + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 0)) { + LISTBASE_FOREACH_MUTABLE (Text *, text, &bmain->texts) { + if (strcmp(text->id.name, "TX.version_warning.py") > 0) { + continue; + } + BLI_remlink(&bmain->texts, text); + } + } + if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 1)) { LISTBASE_FOREACH (Mesh *, mesh, &bmain->meshes) { version_mesh_legacy_to_struct_of_array_format(*mesh);