[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46336] trunk/blender/source/blender/ makesrna/intern/rna_object.c: Bugfix:

Joshua Leung aligorith at gmail.com
Sun May 6 07:03:59 CEST 2012


Revision: 46336
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46336
Author:   aligorith
Date:     2012-05-06 05:03:58 +0000 (Sun, 06 May 2012)
Log Message:
-----------
Bugfix:

While testing the other my previous commit (removing deformflag stuff), I
noticed that trying to change set a parent object for the current object (via
the Object Properties) would cause the current object to "blow up", and for
cyclic dependency warnings to be spewed to the console.

Adding a dummy usage of one of the vars here seems to solve it. Perhaps a case
of weirdo compiler optimisations?

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_object.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_object.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_object.c	2012-05-06 04:50:04 UTC (rev 46335)
+++ trunk/blender/source/blender/makesrna/intern/rna_object.c	2012-05-06 05:03:58 UTC (rev 46336)
@@ -383,8 +383,11 @@
 {
 	Object *ob = (Object*)ptr->data;
 	Object *par = (Object*)value.data;
-
-	ED_object_parent(ob, par, ob->partype, ob->parsubstr);
+	
+	/* NOTE: this dummy check here prevents this method causing weird runtime errors on mingw 4.6.2 */
+	if (ob) {
+		ED_object_parent(ob, par, ob->partype, ob->parsubstr);
+	}
 }
 
 static void rna_Object_parent_type_set(PointerRNA *ptr, int value)




More information about the Bf-blender-cvs mailing list