fix own error - remove doubles slot name.

This commit is contained in:
Campbell Barton
2012-11-22 01:00:40 +00:00
parent 629ea82a13
commit 55535b21fe
2 changed files with 6 additions and 4 deletions

View File

@@ -80,7 +80,7 @@ const int BMO_OPSLOT_TYPEINFO[BMO_OP_SLOT_TOTAL_TYPES] = {
};
/* Dummy slot so there is something to return when slot name lookup fails */
static BMOpSlot BMOpEmptySlot = {0};
// static BMOpSlot BMOpEmptySlot = {0};
void BMO_op_flag_enable(BMesh *UNUSED(bm), BMOperator *op, const int op_flag)
{
@@ -252,8 +252,10 @@ BMOpSlot *BMO_slot_get(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *identif
{
int slot_code = bmo_name_to_slotcode_check(slot_args, identifier);
if (slot_code < 0) {
return &BMOpEmptySlot;
if (UNLIKELY(slot_code < 0)) {
//return &BMOpEmptySlot;
BLI_assert(0);
NULL; /* better crash */
}
return &slot_args[slot_code];

View File

@@ -579,7 +579,7 @@ void bmo_remove_doubles_exec(BMesh *bm, BMOperator *op)
void bmo_find_doubles_exec(BMesh *bm, BMOperator *op)
{
BMOpSlot *slot_targetmap_out;
slot_targetmap_out = BMO_slot_get(op->slots_out, "targetmap");
slot_targetmap_out = BMO_slot_get(op->slots_out, "targetmap.out");
bmesh_find_doubles_common(bm, op,
op, slot_targetmap_out);
}