From 6989c52a3fb9473fd61326e548440fff887525c2 Mon Sep 17 00:00:00 2001 From: Michel Zou Date: Thu, 6 Feb 2020 07:02:06 +0100 Subject: [PATCH] Fix doxy2swig.py IndexError: list index out of range --- doc/doxy2swig.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/doxy2swig.py b/doc/doxy2swig.py index 5589b0dc..a01c4b11 100644 --- a/doc/doxy2swig.py +++ b/doc/doxy2swig.py @@ -299,7 +299,10 @@ def do_memberdef(self, node): name = first['name'].firstChild.data for n in node.getElementsByTagName('param'): - arg_type = n.getElementsByTagName('type')[0] + elts = n.getElementsByTagName('type') + if len(elts) == 0: + continue + arg_type = elts[0] ref = self.get_specific_nodes(arg_type, ('ref')) if 'ref' in ref: type_name = ref['ref'].firstChild.data