Wrap array access for width property in a if-statement to avoid errors with empty arrays. see T53094.

This commit is contained in:
Lukas Treyer 2017-10-23 11:03:55 +02:00
parent b11acbaf48
commit 5f8aaa2d4e
1 changed files with 4 additions and 1 deletions

View File

@ -1135,7 +1135,10 @@ class Do:
return
has_varying_width = is_.varying_width(entity)
th = entity.thickness
w = entity.width[0][0] if hasattr(entity, "width") else 0
w = 0
if hasattr(entity, "width"):
if len(entity.width) > 0 and len(entity.width[0]) > 0:
w = entity.width[0][0]
if w == 0 and not has_varying_width:
if th != 0: