Small cleanup: Remove uneeded/wrong check

If ob was NULL it would crash in the else part of the if statement.
If we really think we may run into that (which we should not) we can just assert
or add a if (ob == NULL) return; in the top of the function.
This commit is contained in:
Dalai Felinto 2018-10-26 13:45:35 -03:00
parent f1974bb340
commit b6a795f285
1 changed files with 1 additions and 1 deletions

View File

@ -403,7 +403,7 @@ static void object_defgroup_remove_edit_mode(Object *ob, bDeformGroup *dg)
*/
void BKE_object_defgroup_remove(Object *ob, bDeformGroup *defgroup)
{
if ((ob) && (ob->type == OB_GPENCIL)) {
if (ob->type == OB_GPENCIL) {
BKE_gpencil_vgroup_remove(ob, defgroup);
}
else {