diff options
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 7 |
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) |