From 32663643c77a931892a2f8e40e011c60bc726d4e Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Fri, 18 Nov 2022 19:59:50 +0200
Subject: [PATCH] SL-18668 Only object id is strictly required

---
 indra/newview/llgltfmateriallist.cpp | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/indra/newview/llgltfmateriallist.cpp b/indra/newview/llgltfmateriallist.cpp
index 306e66bfb74..a6049307156 100644
--- a/indra/newview/llgltfmateriallist.cpp
+++ b/indra/newview/llgltfmateriallist.cpp
@@ -175,12 +175,10 @@ class LLGLTFMaterialOverrideDispatchHandler : public LLDispatchHandler
             return false;
         }
 
-        if (!message.has("sides")
-            || !message.has("gltf_json")
-            || !message.has("object_id"))
+        if (!message.has("object_id"))
         {
             // malformed message, nothing we can do to handle it
-            LL_DEBUGS("GLTF") << "Malformed message:" << message << LL_ENDL;
+            LL_DEBUGS("GLTF") << "Message without id:" << message << LL_ENDL;
             return false;
         }
 
@@ -247,12 +245,13 @@ class LLGLTFMaterialOverrideDispatchHandler : public LLDispatchHandler
             {
 
             LLUUID object_id = message.get("object_id").asUUID();
-            LLSD const& sides = message.get("sides");
             LLViewerObject * obj = gObjectList.findObject(object_id);
-            std::unordered_set<S32> side_set;
 
             if (result.mResults.size() > 0 )
             {
+                LLSD const& sides = message.get("sides");
+                std::unordered_set<S32> side_set;
+
                 for (int i = 0; i < result.mResults.size(); ++i)
                 {
                     if (result.mResults[i])
-- 
GitLab