diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-23 06:31:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-23 06:31:30 +0400 |
commit | 3b487a6944892204afbdc920ac839a266f54aff5 (patch) | |
tree | 7834f1b3cc26f797541ecde21f46f16fd2758c7d /source/blender/editors/mesh/mesh_data.c | |
parent | 89d6cc7e23a26a3036bfa52592303e6d745edd09 (diff) |
fix for all pose-group editing functions crashing when the context didnt have an area (in background mode),
fix pose-group-sort and pose-group-moving being disabled for pinned poses.
also fix for own missing NULL check for pose mask clear which would crash when run without an active object
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.c')
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 60df657a436..a52c8d47ecd 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -772,14 +772,14 @@ static int mesh_customdata_clear_exec__internal(bContext *C, static int mesh_customdata_clear_mask_poll(bContext *C) { Object *ob = ED_object_context(C); - - /* special case - can't run this if we're in sculpt mode */ - if (ob->mode & OB_MODE_SCULPT) { - return FALSE; - } - if (ob && ob->type == OB_MESH) { Mesh *me = ob->data; + + /* special case - can't run this if we're in sculpt mode */ + if (ob->mode & OB_MODE_SCULPT) { + return FALSE; + } + if (me->id.lib == NULL) { CustomData *data = GET_CD_DATA(me, vdata); if (CustomData_has_layer(data, CD_PAINT_MASK)) { |