diff --git a/components/lua_ui/resources.cpp b/components/lua_ui/resources.cpp index 605c9ba58b..0f9890c523 100644 --- a/components/lua_ui/resources.cpp +++ b/components/lua_ui/resources.cpp @@ -7,15 +7,9 @@ namespace LuaUi { std::shared_ptr ResourceManager::registerTexture(TextureData data) { - std::string normalizedPath = mVfs->normalizeFilename(data.mPath); - if (!mVfs->exists(normalizedPath)) - { - auto error = Misc::StringUtils::format("Texture with path \"%s\" doesn't exist", data.mPath); - throw std::logic_error(error); - } - data.mPath = normalizedPath; - - TextureResources& list = mTextures[normalizedPath]; + data.mPath = mVfs->normalizeFilename(data.mPath); + + TextureResources& list = mTextures[data.mPath]; list.push_back(std::make_shared(data)); return list.back(); }