[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28311] branches/render25/source/blender/ render/intern/source/lamp.c: missing null check for lamp groups

Campbell Barton ideasman42 at gmail.com
Tue Apr 20 22:52:16 CEST 2010


Revision: 28311
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28311
Author:   campbellbarton
Date:     2010-04-20 22:52:16 +0200 (Tue, 20 Apr 2010)

Log Message:
-----------
missing null check for lamp groups

Modified Paths:
--------------
    branches/render25/source/blender/render/intern/source/lamp.c

Modified: branches/render25/source/blender/render/intern/source/lamp.c
===================================================================
--- branches/render25/source/blender/render/intern/source/lamp.c	2010-04-20 16:30:34 UTC (rev 28310)
+++ branches/render25/source/blender/render/intern/source/lamp.c	2010-04-20 20:52:16 UTC (rev 28311)
@@ -912,20 +912,22 @@
 	for(go= group->gobject.first; go; go= go->next) {
 		go->lampren= NULL;
 		
-		if(go->ob->lay & re->db.lay) {
-			if(go->ob && go->ob->type==OB_LAMP) {
-				for(gol= re->db.lights.first; gol; gol= gol->next) {
-					if(gol->ob==go->ob) {
-						go->lampren= gol->lampren;
-						break;
+		if(go->ob) {
+			if(go->ob->lay & re->db.lay) {
+				if(go->ob && go->ob->type==OB_LAMP) {
+					for(gol= re->db.lights.first; gol; gol= gol->next) {
+						if(gol->ob==go->ob) {
+							go->lampren= gol->lampren;
+							break;
+						}
 					}
+					if(go->lampren==NULL) 
+						gol= lamp_create(re, go->ob);
+					if(gol && exclusive) {
+						BLI_remlink(&re->db.lights, gol);
+						MEM_freeN(gol);
+					}
 				}
-				if(go->lampren==NULL) 
-					gol= lamp_create(re, go->ob);
-				if(gol && exclusive) {
-					BLI_remlink(&re->db.lights, gol);
-					MEM_freeN(gol);
-				}
 			}
 		}
 	}





More information about the Bf-blender-cvs mailing list