diff options
author | fvogel <fvogelnew1@free.fr> | 2017-08-24 19:24:43 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2017-08-24 19:24:43 (GMT) |
commit | 0e59ffdb20f7cefc58edb867aef78c7895e45445 (patch) | |
tree | f3ddd35705c5ba0d4f17840beb42f3e4a50277a4 | |
parent | 85b8fad810a163281ef26855746e5b9cd47e9b5a (diff) | |
parent | 64c77244f40edcd6aaf4216aaf79b1b2bfae0528 (diff) | |
download | tk-0e59ffdb20f7cefc58edb867aef78c7895e45445.zip tk-0e59ffdb20f7cefc58edb867aef78c7895e45445.tar.gz tk-0e59ffdb20f7cefc58edb867aef78c7895e45445.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 57e8364..7a74344 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; } |