From 8064989e7ba076dd978ef4d6befd579791a95307 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 30 Sep 2013 08:43:22 +0000 Subject: fix regression [#36878], missing NULL checks for linestyle. --- source/blender/editors/space_outliner/outliner_tree.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/space_outliner/outliner_tree.c') 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); + } } } } -- cgit v1.2.3