From a786d11052fac792c4b3e942fd6d3fd1ef2c7b8f Mon Sep 17 00:00:00 2001 From: fvogel Date: Sat, 12 Aug 2017 19:35:34 +0000 Subject: Fix [ee40fd1fce]: Report possible error message from the consoleInterp to interp in Tk_CreateConsoleWindow. Patch from Han The. --- generic/tkConsole.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- cgit v0.12