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>2013-04-08 14:03:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-08 14:03:51 +0400
commit97a6965da9a671987df50570f8206c39569bac78 (patch)
treec992ca5b83fc9531637ab7ab9fc59ae17b62685c /source/blender/editors/mesh/editmesh_inset.c
parentbb98f65112cd238a13fbbdc9143daab66d7d9daf (diff)
fix for various crashes from incorrect poll functions.
- bevel had incorrect cancel when initialization failed which could crash (own mistake). - main particle poll function didnt check if the area/region were NULL. - some uv operators needed space image but didnt check for it. also use uv_ prefix for most operator functions.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_inset.c')
-rw-r--r--source/blender/editors/mesh/editmesh_inset.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c
index b54797337f4..523f4e11b81 100644
--- a/source/blender/editors/mesh/editmesh_inset.c
+++ b/source/blender/editors/mesh/editmesh_inset.c
@@ -107,14 +107,14 @@ static void edbm_inset_update_header(wmOperator *op, bContext *C)
}
-static int edbm_inset_init(bContext *C, wmOperator *op, const bool is_modal)
+static bool edbm_inset_init(bContext *C, wmOperator *op, const bool is_modal)
{
InsetData *opdata;
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BMEdit_FromObject(obedit);
if (em->bm->totvertsel == 0) {
- return 0;
+ return false;
}
op->customdata = opdata = MEM_mallocN(sizeof(InsetData), "inset_operator_data");
@@ -141,7 +141,7 @@ static int edbm_inset_init(bContext *C, wmOperator *op, const bool is_modal)
v3d->twtype = 0;
}
- return 1;
+ return true;
}
static void edbm_inset_exit(bContext *C, wmOperator *op)
@@ -183,7 +183,7 @@ static int edbm_inset_cancel(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
-static int edbm_inset_calc(wmOperator *op)
+static bool edbm_inset_calc(wmOperator *op)
{
InsetData *opdata;
BMEditMesh *em;
@@ -233,11 +233,11 @@ static int edbm_inset_calc(wmOperator *op)
}
if (!EDBM_op_finish(em, &bmop, op, true)) {
- return 0;
+ return false;
}
else {
EDBM_update_generic(em, true, true);
- return 1;
+ return true;
}
}