diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-22 21:12:27 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-01-22 21:12:27 (GMT) |
commit | 3983643839c9f6b6bfd02dc6f4d1ea1e8e8b3c78 (patch) | |
tree | 80a90ccfc780570880025868872ba4939ee05c6d /generic/tkMain.c | |
parent | dae178c6fb5d174b35f7b985caf0d8669349aeb3 (diff) | |
download | tk-3983643839c9f6b6bfd02dc6f4d1ea1e8e8b3c78.zip tk-3983643839c9f6b6bfd02dc6f4d1ea1e8e8b3c78.tar.gz tk-3983643839c9f6b6bfd02dc6f4d1ea1e8e8b3c78.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 5e5ddb7..e88a26f 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -144,12 +144,15 @@ Tk_MainEx(argc, argv, appInitProc, interp) ThreadSpecificData *tsdPtr; /* - * Ensure that we are getting the matching version of Tcl. This is - * really only an issue when Tk is loaded dynamically. + * Ensure that we are getting the matching version of Tcl. */ if (Tcl_InitStubs(interp, TCL_VERSION, 1) == 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) |