Fix T84935: improve previous fix for boolean custom data layers
This improves the fix introduced in rBdc8b31af578bfcf9f77dbce6d7b7da1006a3c8c1. While it did not result in other bugs afaik, I thought it would be good to make the fix more specific, in case some other code did expect `layer->data` to be null. This updated fix checks for the very specific case the fix was intended for.
This commit is contained in:
parent
31f568c336
commit
f22e85d721
Notes:
blender-bot
2023-02-14 09:38:57 +01:00
Referenced by issue #84935, Crashes on entering edit mode with GeoNodes modifier.
|
@ -5197,7 +5197,7 @@ void CustomData_blend_read(BlendDataReader *reader, CustomData *data, int count)
|
|||
|
||||
if (CustomData_verify_versions(data, i)) {
|
||||
BLO_read_data_address(reader, &layer->data);
|
||||
if (layer->data == NULL) {
|
||||
if (layer->data == NULL && count > 0 && layer->type == CD_PROP_BOOL) {
|
||||
/* Usually this should never happen, except when a custom data layer has not been written
|
||||
* to a file correctly. */
|
||||
CLOG_WARN(&LOG, "Reallocating custom data layer that was not saved correctly.");
|
||||
|
|
Loading…
Reference in New Issue