summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-08-24 19:24:12 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-08-24 19:24:12 (GMT)
commit1b7fded7a292da73a9a9c6a349ad96d1e58ef655 (patch)
tree87ea9c800da923af5a5b2492eef7f0747c3f4f77 /generic
parente8ecfdd4ebfbc9ffbc6f20952c25315aa3beae51 (diff)
parent4b17e13ed587afc98a99e51f6c364a01d080498b (diff)
downloadtk-1b7fded7a292da73a9a9c6a349ad96d1e58ef655.zip
tk-1b7fded7a292da73a9a9c6a349ad96d1e58ef655.tar.gz
tk-1b7fded7a292da73a9a9c6a349ad96d1e58ef655.tar.bz2
Fix [ee40fd1fce]: Report possible error message from the consoleInterp to interp in Tk_CreateConsoleWindow. Patch from Han The.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkConsole.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 8bfbe9b..a6a8cbf 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -318,7 +318,7 @@ Tk_InitConsoleChannels(
* Tk_CreateConsoleWindow --
*
* Initialize the console. This code actually creates a new application
- * and associated interpreter. This effectivly hides the implementation
+ * and associated interpreter. This effectively hides the implementation
* from the main application.
*
* Results:
@@ -344,9 +344,13 @@ Tk_CreateConsoleWindow(
/* Init an interp with Tcl and Tk */
Tcl_Interp *consoleInterp = Tcl_CreateInterp();
if (Tcl_Init(consoleInterp) != TCL_OK) {
+ Tcl_Obj *result_obj = Tcl_GetObjResult(consoleInterp);
+ Tcl_SetObjResult(interp, result_obj);
goto error;
}
if (Tk_Init(consoleInterp) != TCL_OK) {
+ Tcl_Obj *result_obj = Tcl_GetObjResult(consoleInterp);
+ Tcl_SetObjResult(interp, result_obj);
goto error;
}