Cleanup: Remove asserts when logging error messages.
If we produce CLOG_ERROR messages and the error is not actually critical, there is no point in asserting too. Mainly related to ID user counts, and a few other ID management areas.
This commit is contained in:
parent
7a31229011
commit
b759a3eac0
|
@ -263,7 +263,6 @@ void id_us_ensure_real(ID *id)
|
|||
"ID user count error: %s (from '%s')",
|
||||
id->name,
|
||||
id->lib ? id->lib->filepath_abs : "[Main]");
|
||||
BLI_assert(0);
|
||||
}
|
||||
id->us = limit + 1;
|
||||
id->tag |= LIB_TAG_EXTRAUSER_SET;
|
||||
|
@ -321,7 +320,6 @@ void id_us_min(ID *id)
|
|||
id->lib ? id->lib->filepath_abs : "[Main]",
|
||||
id->us,
|
||||
limit);
|
||||
BLI_assert(0);
|
||||
}
|
||||
id->us = limit;
|
||||
}
|
||||
|
|
|
@ -1218,7 +1218,6 @@ static ID *lib_override_root_find(Main *bmain, ID *id, const int curr_level, int
|
|||
"Levels of dependency relationships between library overrides IDs is way too high, "
|
||||
"skipping further processing loops (involves at least '%s')",
|
||||
id->name);
|
||||
BLI_assert(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -2339,7 +2338,6 @@ static int lib_override_sort_libraries_func(LibraryIDLinkCallbackData *cb_data)
|
|||
"loops (Involves at least '%s' and '%s')",
|
||||
id_owner->lib->filepath,
|
||||
id->lib->filepath);
|
||||
BLI_assert(0);
|
||||
return IDWALK_RET_NOP;
|
||||
}
|
||||
|
||||
|
|
|
@ -555,7 +555,6 @@ static void libblock_remap_foreach_idpair_cb(ID *old_id, ID *new_id, void *user_
|
|||
new_id ? new_id->name : "<NULL>",
|
||||
new_id,
|
||||
old_id->us - skipped_refcounted);
|
||||
BLI_assert(0);
|
||||
}
|
||||
|
||||
const int skipped_direct = old_id->runtime.remap.skipped_direct;
|
||||
|
|
|
@ -1245,7 +1245,6 @@ bool BKE_object_material_slot_remove(Main *bmain, Object *ob)
|
|||
/* this should never happen and used to crash */
|
||||
if (ob->actcol <= 0) {
|
||||
CLOG_ERROR(&LOG, "invalid material index %d, report a bug!", ob->actcol);
|
||||
BLI_assert(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue