[Bf-blender-cvs] [9a3f32f80ff] sculpt-dev: Fix crash in versioning code

Pablo Dobarro noreply at git.blender.org
Fri Feb 5 21:59:38 CET 2021


Commit: 9a3f32f80ff96c0caf7923aa6d8ecdd0af40fef3
Author: Pablo Dobarro
Date:   Fri Feb 5 20:30:54 2021 +0100
Branches: sculpt-dev
https://developer.blender.org/rB9a3f32f80ff96c0caf7923aa6d8ecdd0af40fef3

Fix crash in versioning code

===================================================================

M	source/blender/blenloader/intern/versioning_290.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 4e952431243..6fb3780dbfe 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1611,12 +1611,6 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
         brush->gpencil_settings->fill_factor = 1.0f;
       }
     }
-
-    if (!DNA_struct_elem_find(fd->filesdna, "Brush", "CurveMapping", "*pressure_size_curve")) {
-      LISTBASE_FOREACH (Brush *, br, &bmain->brushes) {
-        BKE_brush_default_input_curves_set(br);
-      }
-    }
   }
 
   if (!MAIN_VERSION_ATLEAST(bmain, 293, 3)) {
@@ -1678,5 +1672,10 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
    */
   {
     /* Keep this block, even when empty. */
+    if (!DNA_struct_elem_find(fd->filesdna, "Brush", "CurveMapping", "*pressure_size_curve")) {
+      LISTBASE_FOREACH (Brush *, br, &bmain->brushes) {
+        BKE_brush_default_input_curves_set(br);
+      }
+    }
   }
 }



More information about the Bf-blender-cvs mailing list