Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-06-30 11:52:02 +0300
committerBastien Montagne <bastien@blender.org>2020-06-30 13:19:11 +0300
commit0b3313e53230914e79dd5c8f02b90fbaf6a8874b (patch)
treec9e439e67a8de2f01edbdeb2f73c4b3d057301a7 /source/blender/makesrna/intern/rna_access_compare_override.c
parent4783520bfad43b643f9e88dd2386c89c35c52f5f (diff)
Cleanup: LibOverride: Replace raw pointers checks by proper macros.
This is cleaner, but also crucial to avoid weird issues when behaviors of those checks are modified...
Diffstat (limited to 'source/blender/makesrna/intern/rna_access_compare_override.c')
-rw-r--r--source/blender/makesrna/intern/rna_access_compare_override.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c
index 28ee5eca723..cc4daf017eb 100644
--- a/source/blender/makesrna/intern/rna_access_compare_override.c
+++ b/source/blender/makesrna/intern/rna_access_compare_override.c
@@ -108,7 +108,7 @@ bool RNA_property_overridden(PointerRNA *ptr, PropertyRNA *prop)
char *rna_path = RNA_path_from_ID_to_property(ptr, prop);
ID *id = ptr->owner_id;
- if (rna_path == NULL || id == NULL || id->override_library == NULL) {
+ if (rna_path == NULL || id == NULL || !ID_IS_OVERRIDE_LIBRARY(id)) {
return false;
}
@@ -1156,7 +1156,7 @@ eRNAOverrideStatus RNA_property_override_library_status(PointerRNA *ptr,
return override_status;
}
- if (!ptr || !prop || !ptr->owner_id || !(ptr->owner_id)->override_library) {
+ if (!ptr || !prop || !ptr->owner_id || !ID_IS_OVERRIDE_LIBRARY(ptr->owner_id)) {
return override_status;
}