diff options
author | Bastien Montagne <bastien@blender.org> | 2020-04-15 18:23:56 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-04-16 17:21:11 +0300 |
commit | e3d575b37651b20b281f431047d97b43c0ce028d (patch) | |
tree | e3d0cc7f2efb30013a9ba8c89dd5d375b18e4302 /source/blender/makesrna/intern/rna_object.c | |
parent | 79a58eef059ffc3f12d11bd68938cfb1b4cd2462 (diff) |
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index cb8dffe3168..b81a175a94b 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -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 |