Index: generic/nsf.c =================================================================== diff -u -r54277a59a45fb6f055637b9a0e14a2fefd31f7eb -r9bd2c31a189868ce6564005d7b5a7cf9e0dc81a5 --- generic/nsf.c (.../nsf.c) (revision 54277a59a45fb6f055637b9a0e14a2fefd31f7eb) +++ generic/nsf.c (.../nsf.c) (revision 9bd2c31a189868ce6564005d7b5a7cf9e0dc81a5) @@ -26063,7 +26063,7 @@ } result = Tcl_ListObjGetElements(interp, arglistObj, &objc, &objv); - if (likely(result == TCL_OK)) { + if (likely(result == TCL_OK) && parsedParam.paramDefs != NULL) { ParseContext pc; NsfParamDefs *paramDefs = parsedParam.paramDefs; unsigned int processFlags = 0u; Index: tests/parameters.test =================================================================== diff -u -r54277a59a45fb6f055637b9a0e14a2fefd31f7eb -r9bd2c31a189868ce6564005d7b5a7cf9e0dc81a5 --- tests/parameters.test (.../parameters.test) (revision 54277a59a45fb6f055637b9a0e14a2fefd31f7eb) +++ tests/parameters.test (.../parameters.test) (revision 9bd2c31a189868ce6564005d7b5a7cf9e0dc81a5) @@ -3371,6 +3371,13 @@ ? {apply {{} {nsf::parseargs a 1; info exists a}}} "1" ? {apply {{} {nsf::parseargs {a b} {1 2}; expr {[info exists a]+[info exists b]}}}} "2" ? {apply {{} {nsf::parseargs {a b args} {1 2 3 4}; expr {[info exists a]+[info exists b]+[info exists args]}}}} "3" + + ? {apply {{} {nsf::parseargs a 1; expr {"a" in [info vars]};}}} 1 + ? {apply {{} {nsf::parseargs {} {}; llength [info vars];}}} 0 + + # TODO: Are the below cases intended? + ? {apply {{} {nsf::parseargs {a} {}; llength [info vars];}}} 0 + ? {apply {{} {nsf::parseargs {} {1}; llength [info vars];}}} 0 } #