diff options
-rw-r--r-- | src/luaotfload-main.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua index 83ce5e7..bbe09fa 100644 --- a/src/luaotfload-main.lua +++ b/src/luaotfload-main.lua @@ -246,8 +246,18 @@ local install_loaders = function () return loaders end +local luaotfload_initialized = false --- prevent multiple invocations + luaotfload.main = function () + if luaotfload_initialized then + logreport ("log", 0, "load", + "Luaotfload initialization requested but is already \z + loaded, ignoring.") + return + end + luaotfload_initialized = true + luaotfload.loaders = install_loaders () local loaders = luaotfload.loaders local loadmodule = loaders.luaotfload |