Fix a crash if font information is missing

Fix #700
This commit is contained in:
Julien Duponchelle
2016-09-30 10:30:24 +02:00
parent a7184f32bd
commit a01b55f07b
2 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,8 @@ def qt_font_to_style(font, color):
"""
Convert a Qt font to CSS style
"""
if font is None:
font = "TypeWriter,10,-1,5,75,0,0,0,0,0"
font_info = font.split(",")
style = "font-family: {};font-size: {};".format(font_info[0], font_info[1])
if font_info[4] == "75":