[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60431] trunk/blender/source/blender/ editors/space_outliner/outliner_tree.c: fix regression [#36878], missing NULL checks for linestyle.

Campbell Barton ideasman42 at gmail.com
Mon Sep 30 10:43:22 CEST 2013


Revision: 60431
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60431
Author:   campbellbarton
Date:     2013-09-30 08:43:22 +0000 (Mon, 30 Sep 2013)
Log Message:
-----------
fix regression [#36878], missing NULL checks for linestyle.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_outliner/outliner_tree.c

Modified: trunk/blender/source/blender/editors/space_outliner/outliner_tree.c
===================================================================
--- trunk/blender/source/blender/editors/space_outliner/outliner_tree.c	2013-09-30 08:21:12 UTC (rev 60430)
+++ trunk/blender/source/blender/editors/space_outliner/outliner_tree.c	2013-09-30 08:43:22 UTC (rev 60431)
@@ -384,17 +384,21 @@
 
 	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);
+			}
 		}
 	}
 }




More information about the Bf-blender-cvs mailing list