diff --git a/src/logic/scripting/lua/libs/libworld.cpp b/src/logic/scripting/lua/libs/libworld.cpp index 01d1efee3..f858f9637 100644 --- a/src/logic/scripting/lua/libs/libworld.cpp +++ b/src/logic/scripting/lua/libs/libworld.cpp @@ -55,7 +55,7 @@ static int l_get_list(lua::State* L) { auto assets = engine->getAssets(); std::string icon = "world#" + name + ".icon"; - if (!AssetsLoader::loadExternalTexture( + if (!engine->isHeadless() && !AssetsLoader::loadExternalTexture( assets, icon, {worlds[i] / fs::path("icon.png"),