Fix T66031: Text Material Change broken.
font_to_curve code was not handling properly the case where it has nop object to check for mat indices validity. Check should just not happen then, not reset mat indices of chars to default 0 value.
This commit is contained in:
@@ -1408,7 +1408,9 @@ static bool vfont_to_curve(Object *ob,
|
||||
cha = towupper(cha);
|
||||
}
|
||||
|
||||
if (ob == NULL || info->mat_nr > (ob->totcol)) {
|
||||
/* Only do that check in case we do have an object, otherwise all materials get erased every
|
||||
* time that code is called without an object... */
|
||||
if (ob != NULL && (info->mat_nr > (ob->totcol))) {
|
||||
// CLOG_ERROR(
|
||||
// &LOG, "Illegal material index (%d) in text object, setting to 0", info->mat_nr);
|
||||
info->mat_nr = 0;
|
||||
|
||||
Reference in New Issue
Block a user