[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57763] branches/soc-2013-bge/source/ blender: Fixing some crashes with the level of detail system with the default blendfile .

Daniel Stokes kupomail at gmail.com
Wed Jun 26 12:05:54 CEST 2013


Revision: 57763
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57763
Author:   kupoman
Date:     2013-06-26 10:05:53 +0000 (Wed, 26 Jun 2013)
Log Message:
-----------
Fixing some crashes with the level of detail system with the default blendfile.

Modified Paths:
--------------
    branches/soc-2013-bge/source/blender/blenkernel/intern/material.c
    branches/soc-2013-bge/source/blender/editors/space_view3d/drawobject.c

Modified: branches/soc-2013-bge/source/blender/blenkernel/intern/material.c
===================================================================
--- branches/soc-2013-bge/source/blender/blenkernel/intern/material.c	2013-06-26 09:36:59 UTC (rev 57762)
+++ branches/soc-2013-bge/source/blender/blenkernel/intern/material.c	2013-06-26 10:05:53 UTC (rev 57763)
@@ -623,10 +623,11 @@
 	Material ***matarar, *ma;
 	short *totcolp;
 	
-	if (ob == NULL) return NULL;
 	if (BKE_object_lod_check(ob, NULL)) {
 		ob = BKE_object_lod_matob_get(ob);
 	}
+
+	if (ob == NULL) return NULL;
 	
 	/* if object cannot have material, (totcolp == NULL) */
 	totcolp = give_totcolp(ob);

Modified: branches/soc-2013-bge/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- branches/soc-2013-bge/source/blender/editors/space_view3d/drawobject.c	2013-06-26 09:36:59 UTC (rev 57762)
+++ branches/soc-2013-bge/source/blender/editors/space_view3d/drawobject.c	2013-06-26 10:05:53 UTC (rev 57763)
@@ -3234,6 +3234,7 @@
 
 	if (BKE_object_lod_check(ob, scene)) {
 		ob = BKE_object_lod_meshob_get(ob);
+		if (!ob) ob = base->object;
 		me = ob->data;
 		dm->release(dm);
 		dm = mesh_get_derived_final(scene, ob, scene->customdata_mask);




More information about the Bf-blender-cvs mailing list