Don't fail while autodetecting invalid field in import window
on_row_expanded could be called on node without children by sig_autodetect, in such case the returned child is an invalid GtkTreeIter. So it must ignore such case to let sig_autodetect popup an error message. issue4313 review7791002
This commit is contained in:
1 parent
80dc23e002
commit
7a6301cd53
1 file changed
+3
@@ -238,6 +238,9 @@ class WinImport(NoModal):
|
||||
|
||||
def on_row_expanded(self, treeview, iter, path):
|
||||
child = self.model1.iter_children(iter)
|
||||
# autodetect could call for node without children
|
||||
if child is None:
|
||||
return
|
||||
if self.model1.get_value(child, 0) is None:
|
||||
prefix_field = self.model1.get_value(iter, 1)
|
||||
name, model = self.fields[prefix_field]
|
||||
|
||||
Reference in new issue
Block a user