From f0c13c60484e1dec607aad8367e49eea269f6c35 Mon Sep 17 00:00:00 2001 From: Vince Darley Date: Sun, 21 Aug 2005 22:37:19 +0000 Subject: [PATCH] make VfsMatchInDirectory more robust to NULL interps --- ChangeLog | 6 ++++++ generic/vfs.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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; -- 2.23.0