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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-01-22 06:50:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-01-22 06:50:09 +0300
commit799e9c48c1a210386873ae01a0f208675eafffe7 (patch)
treecabbf41a49c072f62336a41c4afde5dd302d2126 /source/blender/editors/object/object_constraint.c
parentf6d54bd1eed7a6d6382d237b7d2291c4ba495246 (diff)
comment dead code and fix 2 missing NULL checks (pointer used after NULL check and checking against incorrect pointer before use).
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r--source/blender/editors/object/object_constraint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 9322886266a..344c2c13861 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -469,11 +469,11 @@ static EnumPropertyItem constraint_owner_items[] = {
static int edit_constraint_poll_generic(bContext *C, StructRNA *rna_type)
{
PointerRNA ptr= CTX_data_pointer_get_type(C, "constraint", rna_type);
- Object *ob= (ptr.id.data)?ptr.id.data:ED_object_active_context(C);
-
+ Object *ob= (ptr.id.data) ? ptr.id.data : ED_object_active_context(C);
+
if (!ob || ob->id.lib) return 0;
- if (ptr.data && ((ID*)ptr.id.data)->lib) return 0;
-
+ if (ptr.id.data && ((ID*)ptr.id.data)->lib) return 0;
+
return 1;
}