diff --git a/src/lua/lua_manager.cpp b/src/lua/lua_manager.cpp index 911245d4..d981c83b 100644 --- a/src/lua/lua_manager.cpp +++ b/src/lua/lua_manager.cpp @@ -88,6 +88,12 @@ namespace big void lua_manager::load_module(const std::filesystem::path& module_path) { + if (!std::filesystem::exists(module_path)) + { + LOG(WARNING) << reinterpret_cast(module_path.u8string().c_str()) << " does not exist in the filesystem. Not loading it."; + return; + } + std::lock_guard guard(m_module_lock); const auto module_name = module_path.filename().string();