Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2012-05-06 09:03:58 +0400
committerJoshua Leung <aligorith@gmail.com>2012-05-06 09:03:58 +0400
commit6f09dffa367944f1f6c13a71b6494b2c41633a2b (patch)
tree192dfd65e5fc065ac5b2633311ccd8c139cb13a3 /source
parent364388b9f2a2ddc838f8182537c1ddf3f0ea0f0b (diff)
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?
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_object.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 38f0b7e26cb..ca18eac8e60 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -383,8 +383,11 @@ static void rna_Object_parent_set(PointerRNA *ptr, PointerRNA value)
{
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)