Fix segmentation fault when top==NULL
Introduced by nested class handling (reported in issue#346 by Paweł Tomulik).
This commit is contained in:
parent
1dd401899f
commit
de1cae9319
2 changed files with 8 additions and 0 deletions
|
|
@ -340,6 +340,8 @@ static void insertNodeAfter(Node *n, Node *c) {
|
|||
}
|
||||
|
||||
void Swig_nested_name_unnamed_c_structs(Node *n) {
|
||||
if (!n)
|
||||
return;
|
||||
if (!classhash)
|
||||
classhash = Getattr(n, "classes");
|
||||
Node *c = firstChild(n);
|
||||
|
|
@ -427,6 +429,8 @@ static void remove_outer_class_reference(Node *n) {
|
|||
}
|
||||
|
||||
void Swig_nested_process_classes(Node *n) {
|
||||
if (!n)
|
||||
return;
|
||||
Node *c = firstChild(n);
|
||||
while (c) {
|
||||
Node *next = nextSibling(c);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue