From 995453e1a0afa8b6b073e157677ffe6d89b3de6f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 1 Oct 2019 15:04:38 +0000 Subject: further fix handling -DBUILD_STATIC --- generic/tclStubLibTbl.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/generic/tclStubLibTbl.c b/generic/tclStubLibTbl.c index 37b6856..cc1bb89 100644 --- a/generic/tclStubLibTbl.c +++ b/generic/tclStubLibTbl.c @@ -35,6 +35,12 @@ TclInitStubTable( structure variable. */ { if (version) { + if (tclStubsHandle == NULL) { + /* This can only happen with -DBUILD_STATIC, so simulate + * that the loading of Tcl succeeded, although we didn't + * actually loaded it dynamically */ + tclStubsHandle = (void *)1; + } tclStubsPtr = ((const TclStubs **) version)[-1]; if (tclStubsPtr->hooks) { -- cgit v0.12