diff options
Diffstat (limited to 'source/blender/blenkernel')
-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; |