diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py
index 23704ecc75ec0c3f9556f55c424ce0f6f35200a5..0d9b69531f42d72954235b0dc0367a324696bf47 100644
--- a/src/gtkgui_helpers.py
+++ b/src/gtkgui_helpers.py
@@ -38,10 +38,11 @@ def get_theme_font_for_option(theme, option):
 	font_name = gajim.config.get_per('themes', theme, option)
 	font_desc = pango.FontDescription()
 	font_prop_str =  gajim.config.get_per('themes', theme, option + 'attrs')
-	if font_prop_str.find('B') != -1:
-		font_desc.set_weight(pango.WEIGHT_BOLD)
-	if font_prop_str.find('I') != -1:
-		font_desc.set_style(pango.STYLE_ITALIC)
+	if font_prop_str:
+		if font_prop_str.find('B') != -1:
+			font_desc.set_weight(pango.WEIGHT_BOLD)
+		if font_prop_str.find('I') != -1:
+			font_desc.set_style(pango.STYLE_ITALIC)
 	fd = pango.FontDescription(font_name)
 	fd.merge(font_desc, True)
 	return fd.to_string()