bugfix [#21161] Multiresolution Reshape causes crash

disallow reshape running when the multires mesh isnt available.
This commit is contained in:
Campbell Barton
2010-02-16 10:06:44 +00:00
parent 23efeff6a9
commit 9a6332bea9

View File

@@ -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;