diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-09-30 12:43:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-09-30 12:43:22 +0400 |
commit | 8064989e7ba076dd978ef4d6befd579791a95307 (patch) | |
tree | c1f9d299af9f9826d4dd78a74836cbb4032572fb /source/blender/editors/space_outliner | |
parent | be654aab58c6d881ee3db95e542e729da23b0ede (diff) |
fix regression [#36878], missing NULL checks for linestyle.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index b86fba1398a..10890a305fb 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -384,17 +384,21 @@ static void outliner_add_line_styles(SpaceOops *soops, ListBase *lb, Scene *sce, for (srl = sce->r.layers.first; srl; srl = srl->next) { for (lineset = srl->freestyleConfig.linesets.first; lineset; lineset = lineset->next) { - lineset->linestyle->id.flag |= LIB_DOIT; + FreestyleLineStyle *linestyle = lineset->linestyle; + if (linestyle) { + linestyle->id.flag |= LIB_DOIT; + } } } for (srl = sce->r.layers.first; srl; srl = srl->next) { for (lineset = srl->freestyleConfig.linesets.first; lineset; lineset = lineset->next) { FreestyleLineStyle *linestyle = lineset->linestyle; - - if (!(linestyle->id.flag & LIB_DOIT)) - continue; - linestyle->id.flag &= ~LIB_DOIT; - outliner_add_element(soops, lb, linestyle, te, 0, 0); + if (linestyle) { + if (!(linestyle->id.flag & LIB_DOIT)) + continue; + linestyle->id.flag &= ~LIB_DOIT; + outliner_add_element(soops, lb, linestyle, te, 0, 0); + } } } } |