diff --git a/CHANGES.current b/CHANGES.current index 216484693..14e662774 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,6 +5,9 @@ See the RELEASENOTES file for a summary of changes in each release. Version 2.0.2 (in progress) =========================== +2011-02-04: wsfulton + [clisp] SF #3148200 Fix segfault parsing nested unions. + 2011-02-01: wsfulton [C#] Directors - a call to a method being defined in the base class, not overridden in a subclass, but again overridden in a class derived from diff --git a/Source/Modules/clisp.cxx b/Source/Modules/clisp.cxx index b1a6f5610..d26df36c2 100644 --- a/Source/Modules/clisp.cxx +++ b/Source/Modules/clisp.cxx @@ -293,16 +293,18 @@ int CLISP::classDeclaration(Node *n) { } String *temp = Copy(Getattr(c, "decl")); - Append(temp, Getattr(c, "type")); //appending type to the end, otherwise wrong type - String *lisp_type = get_ffi_type(n, temp); - Delete(temp); + if (temp) { + Append(temp, Getattr(c, "type")); //appending type to the end, otherwise wrong type + String *lisp_type = get_ffi_type(n, temp); + Delete(temp); - String *slot_name = Getattr(c, "sym:name"); - Printf(f_cl, "\n\t(%s %s)", slot_name, lisp_type); + String *slot_name = Getattr(c, "sym:name"); + Printf(f_cl, "\n\t(%s %s)", slot_name, lisp_type); - Append(entries, NewStringf("%s-%s", name, slot_name)); + Append(entries, NewStringf("%s-%s", name, slot_name)); - Delete(lisp_type); + Delete(lisp_type); + } } Printf(f_cl, ")\n");