summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-01-07 11:14:39 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-01-07 11:14:39 (GMT)
commit60e0fa23ae1d3b202486d2427812fa3e65ecdae2 (patch)
treeb4fce5aa52776f53362856c3939f205cc659bae7
parent6dbc2e8dbbfbad51e0a9464f28a3ae1d06649250 (diff)
downloadtk-60e0fa23ae1d3b202486d2427812fa3e65ecdae2.zip
tk-60e0fa23ae1d3b202486d2427812fa3e65ecdae2.tar.gz
tk-60e0fa23ae1d3b202486d2427812fa3e65ecdae2.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 cc3d42e..f0c4678 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 c71f8a0..d392241 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.65 2004/12/17 14:27:18 chengyemao Exp $
+ * RCS: @(#) $Id: tkWindow.c,v 1.66 2005/01/07 11:14:39 dkf Exp $
*/
#include "tkPort.h"
@@ -479,6 +479,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;