[Bf-blender-cvs] [a36f02f9ba9] master: Fix (unreported) LibOverride: possible uninitialized return variable.

Bastien Montagne noreply at git.blender.org
Tue Oct 13 20:38:14 CEST 2020


Commit: a36f02f9ba9877a12dc5b453a348d01cd89f46c0
Author: Bastien Montagne
Date:   Tue Oct 13 20:36:38 2020 +0200
Branches: master
https://developer.blender.org/rBa36f02f9ba9877a12dc5b453a348d01cd89f46c0

Fix (unreported) LibOverride: possible uninitialized return variable.

===================================================================

M	source/blender/makesrna/intern/rna_access_compare_override.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c
index 098854513a4..202864a7d82 100644
--- a/source/blender/makesrna/intern/rna_access_compare_override.c
+++ b/source/blender/makesrna/intern/rna_access_compare_override.c
@@ -1160,6 +1160,10 @@ IDOverrideLibraryProperty *RNA_property_override_property_get(Main *bmain,
   ID *id;
   char *rna_path;
 
+  if (r_created != NULL) {
+    *r_created = false;
+  }
+
   if ((rna_path = rna_property_override_property_real_id_owner(bmain, ptr, prop, &id)) != NULL) {
     IDOverrideLibraryProperty *op = BKE_lib_override_library_property_get(
         id->override_library, rna_path, r_created);
@@ -1198,6 +1202,10 @@ IDOverrideLibraryPropertyOperation *RNA_property_override_property_operation_get
     bool *r_strict,
     bool *r_created)
 {
+  if (r_created != NULL) {
+    *r_created = false;
+  }
+
   IDOverrideLibraryProperty *op = RNA_property_override_property_get(bmain, ptr, prop, NULL);
 
   if (!op) {



More information about the Bf-blender-cvs mailing list