prevent NoneType TB if fontattrs are not set
This commit is contained in:
parent
8e2dd60449
commit
159a4dad42
|
@ -38,6 +38,7 @@ def get_theme_font_for_option(theme, option):
|
||||||
font_name = gajim.config.get_per('themes', theme, option)
|
font_name = gajim.config.get_per('themes', theme, option)
|
||||||
font_desc = pango.FontDescription()
|
font_desc = pango.FontDescription()
|
||||||
font_prop_str = gajim.config.get_per('themes', theme, option + 'attrs')
|
font_prop_str = gajim.config.get_per('themes', theme, option + 'attrs')
|
||||||
|
if font_prop_str:
|
||||||
if font_prop_str.find('B') != -1:
|
if font_prop_str.find('B') != -1:
|
||||||
font_desc.set_weight(pango.WEIGHT_BOLD)
|
font_desc.set_weight(pango.WEIGHT_BOLD)
|
||||||
if font_prop_str.find('I') != -1:
|
if font_prop_str.find('I') != -1:
|
||||||
|
|
Loading…
Reference in New Issue