Fix crash in liboverride resync.

Reported by studio (@andy), thanks.
This commit is contained in:
Bastien Montagne 2021-05-28 15:33:04 +02:00
parent 63e50cf265
commit 97ccd592ce
1 changed files with 7 additions and 0 deletions

View File

@ -252,6 +252,13 @@ bool BKE_lib_override_library_is_user_edited(struct ID *id)
return false;
}
/* A bit weird, but those embedded IDs are handled by their owner ID anyway, so we can just
* assume they are never user-edited, actual proper detection will happen from their owner check.
*/
if (!ID_IS_OVERRIDE_LIBRARY_REAL(id)) {
return false;
}
LISTBASE_FOREACH (IDOverrideLibraryProperty *, op, &id->override_library->properties) {
LISTBASE_FOREACH (IDOverrideLibraryPropertyOperation *, opop, &op->operations) {
if ((opop->flag & IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE) != 0) {