[Bf-blender-cvs] [6dafb89] master: Fix FCurve reading freed themes, assert to prevent further misuse

Campbell Barton noreply at git.blender.org
Tue Feb 18 02:35:57 CET 2014


Commit: 6dafb89436c0b9bc35895262dda059c2729610c1
Author: Campbell Barton
Date:   Tue Feb 18 12:33:19 2014 +1100
https://developer.blender.org/rB6dafb89436c0b9bc35895262dda059c2729610c1

Fix FCurve reading freed themes, assert to prevent further misuse

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

M	source/blender/editors/interface/resources.c
M	source/blender/editors/space_graph/space_graph.c

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

diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 6d3f6ab..d62ec70 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -90,6 +90,9 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
 	static char setting = 0;
 	const char *cp = error;
 	
+	/* ensure we're not getting a color after running BKE_userdef_free */
+	BLI_assert(BLI_findindex(&U.themes, theme_active) != -1);
+
 	if (btheme) {
 	
 		/* first check for ui buttons theme */
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index ccb98df..2aac313 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -548,6 +548,8 @@ static void graph_refresh(const bContext *C, ScrArea *sa)
 		int filter;
 		int i;
 		
+		UI_SetTheme(SPACE_IPO, RGN_TYPE_WINDOW);
+
 		/* build list of F-Curves which will be visible as channels in channel-region
 		 *  - we don't include ANIMFILTER_CURVEVISIBLE filter, as that will result in a
 		 *    mismatch between channel-colors and the drawn curves




More information about the Bf-blender-cvs mailing list