From: Vince Darley Date: Sun, 21 Aug 2005 22:37:19 +0000 (+0000) Subject: make VfsMatchInDirectory more robust to NULL interps X-Git-Tag: vfs-1-4~72 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=f0c13c60484e1dec607aad8367e49eea269f6c35;p=tclvfs make VfsMatchInDirectory more robust to NULL interps --- diff --git a/ChangeLog b/ChangeLog index 75a31c4..1a0af64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-09-28 Vince Darley + + * generic/vfs.c: despite lack of documentation on this point, + VfsMatchInDirectory should really allow a NULL interp, even in + error situations. + 2005-03-18 Jeff Hobbs * Makefile.in (AR): use @AR@ diff --git a/generic/vfs.c b/generic/vfs.c index af58892..7db4160 100644 --- a/generic/vfs.c +++ b/generic/vfs.c @@ -1554,7 +1554,11 @@ VfsMatchInDirectory( Tcl_ListObjAppendList(cmdInterp, returnPtr, vfsResultPtr); Tcl_DecrRefCount(vfsResultPtr); } else { - Tcl_SetObjResult(cmdInterp, vfsResultPtr); + if (cmdInterp != NULL) { + Tcl_SetObjResult(cmdInterp, vfsResultPtr); + } else { + Tcl_DecrRefCount(vfsResultPtr); + } } } return returnVal;