diff options
author | fvogel <fvogelnew1@free.fr> | 2017-08-24 19:24:12 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-08-24 19:24:12 (GMT) |
commit | 64c77244f40edcd6aaf4216aaf79b1b2bfae0528 (patch) | |
tree | 87ea9c800da923af5a5b2492eef7f0747c3f4f77 | |
parent | 69427a14caab82968d945571eefd26a5a112c9cf (diff) | |
parent | a786d11052fac792c4b3e942fd6d3fd1ef2c7b8f (diff) | |
download | tk-64c77244f40edcd6aaf4216aaf79b1b2bfae0528.zip tk-64c77244f40edcd6aaf4216aaf79b1b2bfae0528.tar.gz tk-64c77244f40edcd6aaf4216aaf79b1b2bfae0528.tar.bz2 |
Fix [ee40fd1fce]: Report possible error message from the consoleInterp to interp in Tk_CreateConsoleWindow. Patch from Han The.
-rw-r--r-- | generic/tkConsole.c | 6 |
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; } |