Don't crash when rendering special cells with absurd cell sizes

Fixes #1378
This commit is contained in:
Kovid Goyal 2019-02-14 09:49:51 +05:30
parent f98d780f3e
commit 27acd4c7d4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -149,7 +149,11 @@ def render_special(
ans = CharTexture if missing else CharTexture()
def dl(f, *a):
f(ans, cell_width, *a)
try:
f(ans, cell_width, *a)
except Exception as e:
log_error('Failed to render {} at cell_width={} and cell_height={} with error: {}'.format(
f.__name__, cell_width, cell_height, e))
if underline:
t = underline_thickness