summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-01-07 11:16:28 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-01-07 11:16:28 (GMT)
commit81d9c06d1ce5cfb61913049037b3f03977cb7cc7 (patch)
tree36b0f791358a85eaa3758903efabfc5893bb6066
parent288d04db72fde57aa6b8febaa1a53916a80165be (diff)
downloadtk-81d9c06d1ce5cfb61913049037b3f03977cb7cc7.zip
tk-81d9c06d1ce5cfb61913049037b3f03977cb7cc7.tar.gz
tk-81d9c06d1ce5cfb61913049037b3f03977cb7cc7.tar.bz2
Add missing Tcl_ResetResult [697915]
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkWindow.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 46b32b5..9a2b20d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-07 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * generic/tkWindow.c (GetScreen): Make sure the result is reset on
+ all error paths to stop strange errors. [Bug 697915]
+
2005-01-05 Donal K. Fellows <donal.k.fellows@man.ac.uk>
* doc/loadTk.n, doc/toplevel.n: Convert to other form of emacs
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 53d4a8c..35a16cc 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWindow.c,v 1.56.2.4 2004/10/27 00:37:38 davygrvy Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.56.2.5 2005/01/07 11:16:29 dkf Exp $
*/
#include "tkPort.h"
@@ -485,6 +485,7 @@ GetScreen(interp, screenName, screenPtr)
*/
dispPtr = TkpOpenDisplay(screenName);
if (dispPtr == NULL) {
+ Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "couldn't connect to display \"",
screenName, "\"", (char *) NULL);
return (TkDisplay *) NULL;