diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-16 13:06:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-16 13:06:44 +0300 |
commit | 9a6332bea9ba327c22e0097bf09f7acd68dd5ff6 (patch) | |
tree | e3aa5c8284d10b258e86fb1c56d5b6a2c19d5046 /source/blender/editors/object/object_modifier.c | |
parent | 23efeff6a90c924889c8e15889ff105e65487ea2 (diff) |
bugfix [#21161] Multiresolution Reshape causes crash
disallow reshape running when the multires mesh isnt available.
Diffstat (limited to 'source/blender/editors/object/object_modifier.c')
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index a4cef0634ee..472c3038d6a 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -819,6 +819,11 @@ static int multires_reshape_exec(bContext *C, wmOperator *op) Object *ob= ptr.id.data, *secondob= NULL; MultiresModifierData *mmd= ptr.data; + if(ob->derivedFinal == NULL || ob->derivedFinal->type != DM_TYPE_CCGDM) { + BKE_report(op->reports, RPT_ERROR, "Active objects multires is disabled, can't reshape multires data."); + return OPERATOR_CANCELLED; + } + CTX_DATA_BEGIN(C, Object*, selob, selected_editable_objects) { if(selob->type == OB_MESH && selob != ob) { secondob= selob; |