Add missing test on field in set_column_widget

Field can be None when adding a column for a button
Introduced in changeset 37b76806c878

issue4882
This commit is contained in:
Cédric Krier committed 2015-07-17 15:12:42 +02:00
1 parent 69d5b47868
commit 688b8d15f9
1 file changed
+1 -1
+1 -1
View File
@@ -456,7 +456,7 @@ class ViewTree(View):
tooltips = Tooltips()
hbox = gtk.HBox(False, 2)
label = gtk.Label(attributes['string'])
if field.attrs.get('required'):
if field and field.attrs.get('required'):
attrlist = pango.AttrList()
attrlist.insert(pango.AttrWeight(pango.WEIGHT_BOLD, 0, -1))
label.set_attributes(attrlist)