[Bf-blender-cvs] [0b749d5] master: Fix unlikely uninitialized pointer usage.

Bastien Montagne noreply at git.blender.org
Mon Oct 24 10:26:10 CEST 2016


Commit: 0b749d57ee88863702b13cb5a746ed04410511b7
Author: Bastien Montagne
Date:   Mon Oct 24 10:25:04 2016 +0200
Branches: master
https://developer.blender.org/rB0b749d57ee88863702b13cb5a746ed04410511b7

Fix unlikely uninitialized pointer usage.

Reported by Coverity.

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

M	source/blender/editors/screen/screen_ops.c

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

diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index a6b6ccd..860a865 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -4197,7 +4197,7 @@ static int space_context_cycle_poll(bContext *C)
 
 /**
  * Helper to get the correct RNA pointer/property pair for changing
- * the display context of active space type in \sa.
+ * the display context of active space type in \a sa.
  */
 static void context_cycle_prop_get(
         bScreen *screen, const ScrArea *sa,
@@ -4214,6 +4214,9 @@ static void context_cycle_prop_get(
 			RNA_pointer_create(NULL, &RNA_UserPreferences, &U, r_ptr);
 			propname = "active_section";
 			break;
+		default:
+			BLI_assert(0);
+			propname = "";
 	}
 
 	*r_prop = RNA_struct_find_property(r_ptr, propname);




More information about the Bf-blender-cvs mailing list