diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-07-31 16:36:36 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-07-31 16:38:01 +0300 |
commit | 4328b56980efd0f12cc846bf8a8b7988335d51e5 (patch) | |
tree | c2e5bbf4be3e1608547dde1b10ab320f7991506e /source/blender | |
parent | 8b1041d510dd18fe7d4f4c60856e66e0f4dedff0 (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/font.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index a0216e9b413..78117a4f615 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -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; |