summaryrefslogtreecommitdiffstats
path: root/generic/tkMain.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-22 21:20:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-22 21:20:43 (GMT)
commit4d6857c9421633368b12903cd5ce41647eddbc97 (patch)
tree545e7e06de4cff94cb054879f42bed4cddeb9279 /generic/tkMain.c
parent56711c375a0242c68158d1167245bccc01e73877 (diff)
parentac6817583cebaa59894005900cde14432c1b43ed (diff)
downloadtk-4d6857c9421633368b12903cd5ce41647eddbc97.zip
tk-4d6857c9421633368b12903cd5ce41647eddbc97.tar.gz
tk-4d6857c9421633368b12903cd5ce41647eddbc97.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.c9
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)