Fix T75730: Crash on read of liboverride data when missing source modifier.
While this should not happen, we still want to handle those errors gracefully from user perspective (i.e. assert for devs, no crash for users). Actual fix of root cause of the issue will come later.
This commit is contained in:
parent
79a58eef05
commit
e3d575b376
Notes:
blender-bot
2023-02-14 07:40:56 +01:00
Referenced by issue #75730, Library override loosing data block crashes and corrupts the scene -reproducible
|
@ -1625,7 +1625,10 @@ bool rna_Object_modifiers_override_apply(Main *bmain,
|
|||
}
|
||||
mod_src = mod_src ? mod_src->next : ob_src->modifiers.first;
|
||||
|
||||
BLI_assert(mod_src != NULL);
|
||||
if (mod_src == NULL) {
|
||||
BLI_assert(mod_src != NULL);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* While it would be nicer to use lower-level modifier_new() here, this one is lacking
|
||||
* special-cases handling (particles and other physics modifiers mostly), so using the ED version
|
||||
|
|
Loading…
Reference in New Issue