diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2015-05-03 13:44:49 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-05-03 13:47:54 +0300 |
commit | 958e6b1f20436b7f6b9f3cef3928feef170789ec (patch) | |
tree | 73258944cfcddbaa1ee21ddf30d0be63766a0a4f /source/blender/makesrna/intern/rna_key.c | |
parent | dbc4be381d4fb44d2915d6d78588fa860cff8bd1 (diff) |
Some NULL pointer checks in shape key code to ensure the Key struct can
be used without a 'from' pointer.
Diffstat (limited to 'source/blender/makesrna/intern/rna_key.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_key.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 249d132068c..d34af9ff649 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -303,7 +303,7 @@ static void rna_ShapeKey_data_begin(CollectionPropertyIterator *iter, PointerRNA Nurb *nu; int tot = kb->totelem, size = key->elemsize; - if (GS(key->from->name) == ID_CU) { + if (key->from && GS(key->from->name) == ID_CU) { cu = (Curve *)key->from; nu = cu->nurb.first; @@ -324,7 +324,7 @@ static int rna_ShapeKey_data_length(PointerRNA *ptr) Nurb *nu; int tot = kb->totelem; - if (GS(key->from->name) == ID_CU) { + if (key->from && GS(key->from->name) == ID_CU) { cu = (Curve *)key->from; nu = cu->nurb.first; @@ -342,7 +342,7 @@ static PointerRNA rna_ShapeKey_data_get(CollectionPropertyIterator *iter) Curve *cu; Nurb *nu; - if (GS(key->from->name) == ID_CU) { + if (key->from && GS(key->from->name) == ID_CU) { cu = (Curve *)key->from; nu = cu->nurb.first; |