summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-08-12 19:35:34 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-08-12 19:35:34 (GMT)
commita786d11052fac792c4b3e942fd6d3fd1ef2c7b8f (patch)
tree7a21c1797cc97ad3eb484a294a0facf4c0b136f2 /generic
parent1364a529c92c6e64af2308174eb56b09001e5fa7 (diff)
downloadtk-a786d11052fac792c4b3e942fd6d3fd1ef2c7b8f.zip
tk-a786d11052fac792c4b3e942fd6d3fd1ef2c7b8f.tar.gz
tk-a786d11052fac792c4b3e942fd6d3fd1ef2c7b8f.tar.bz2
Fix [ee40fd1fce]: Report possible error message from the consoleInterp to interp in Tk_CreateConsoleWindow. Patch from Han The.bug_ee40fd1fce
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;
}