summaryrefslogtreecommitdiffstats
path: root/generic
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)
commit8faee2bb6cd4206d77f37e8dffaae0adb9df40d0 (patch)
tree545e7e06de4cff94cb054879f42bed4cddeb9279 /generic
parent0003ea33e7d5ef450e901ef2975788a8c6283c38 (diff)
parent3983643839c9f6b6bfd02dc6f4d1ea1e8e8b3c78 (diff)
downloadtk-8faee2bb6cd4206d77f37e8dffaae0adb9df40d0.zip
tk-8faee2bb6cd4206d77f37e8dffaae0adb9df40d0.tar.gz
tk-8faee2bb6cd4206d77f37e8dffaae0adb9df40d0.tar.bz2
Bug [3601782]: Produce a nice error-message when the first Tcl_InitStubs() fails, in stead of simply abort()
Diffstat (limited to 'generic')
-rw-r--r--generic/tkConsole.c3
-rw-r--r--generic/tkMain.c9
2 files changed, 7 insertions, 5 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index f894638..2cd2632 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -220,8 +220,7 @@ Tk_InitConsoleChannels(
Tcl_Channel consoleChannel;
/*
- * 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) {
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)