diff options
author | nijtmans@users.sourceforge.net <jan.nijtmans> | 2013-01-22 21:20:43 (GMT) |
---|---|---|
committer | nijtmans@users.sourceforge.net <jan.nijtmans> | 2013-01-22 21:20:43 (GMT) |
commit | d578e1f3abba77ba0c696ecfc9211d29d906f35c (patch) | |
tree | dd76c98ee4b71604d32674d016def84ca74f2b74 /generic/tkMain.c | |
parent | c632b393034763e550da395a54491a63051febd9 (diff) | |
parent | 3d4246feab2d88df7ef47a7d474372de29e69a8f (diff) | |
download | tk-d578e1f3abba77ba0c696ecfc9211d29d906f35c.zip tk-d578e1f3abba77ba0c696ecfc9211d29d906f35c.tar.gz tk-d578e1f3abba77ba0c696ecfc9211d29d906f35c.tar.bz2 |
Bug [3601782]: Produce a nice error-message when the first Tcl_InitStubs() fails, in stead of simply abort()
Diffstat (limited to 'generic/tkMain.c')
-rw-r--r-- | generic/tkMain.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/tkMain.c b/generic/tkMain.c index b794ce0..5d58932 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -132,12 +132,15 @@ Tk_MainEx( Tcl_DString appName; /* - * Ensure that we are getting a compatible version of Tcl. This is really - * only an issue when Tk is loaded dynamically. + * Ensure that we are getting a compatible version of Tcl. */ if (Tcl_InitStubs(interp, "8.5.0", 0) == NULL) { - abort(); + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + abort(); + } else { + Tcl_Panic("%s", Tcl_GetStringResult(interp)); + } } #if defined(__WIN32__) && !defined(__WIN64__) && !defined(STATIC_BUILD) |