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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-02-18 05:33:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-02-18 05:33:19 +0400
commit6dafb89436c0b9bc35895262dda059c2729610c1 (patch)
tree5cbabfd938addb7810dfa0e577b5cc105a7d1344 /source
parent410613ec098a19c12e35c4af13f71b65243ddd9d (diff)
Fix FCurve reading freed themes, assert to prevent further misuse
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/resources.c3
-rw-r--r--source/blender/editors/space_graph/space_graph.c2
2 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 6d3f6ab4991..d62ec708729 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 ccb98dfd13d..2aac3133b7b 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