Fix crash in versioning code

This commit is contained in:
Pablo Dobarro 2021-02-05 20:30:54 +01:00
parent bcf2f30878
commit 9a3f32f80f
1 changed files with 5 additions and 6 deletions

View File

@ -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);
}
}
}
}