From 75f9251173231dd036b2fc46ffe4e860d76736a3 Mon Sep 17 00:00:00 2001 From: minerjr Date: Sun, 14 Jun 2026 14:10:27 -0300 Subject: [PATCH] Fix for new Reorder Omnifilter Issue was found that when loading the Omnifilter without the order tag, the code was failing to load the rest of the data correctly. Fixed now by checking to see if the tag exists and if not, just add the name in the order of the map. --- indra/newview/omnifilterengine.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/newview/omnifilterengine.cpp b/indra/newview/omnifilterengine.cpp index 3c8b4146db..bdc524049d 100644 --- a/indra/newview/omnifilterengine.cpp +++ b/indra/newview/omnifilterengine.cpp @@ -396,6 +396,7 @@ void OmnifilterEngine::loadNeedles() mOrderedNeedles.clear(); // Pre-allocate space for the list of needle names, so we can use an index into it for assignments down below mOrderedNeedles.resize(needles_llsd.size()); + S32 index = 0; // [FIRE-36649] for (const auto& [new_needle_name, needle_data] : llsd::inMap(needles_llsd)) { @@ -432,7 +433,15 @@ void OmnifilterEngine::loadNeedles() // Needles are stored in order added to the map originally so use the // order value stored to restore the order back to the user // defined order. - mOrderedNeedles[needle_data["order"].asInteger()] = new_needle_name; + if (needle_data.has("order")) + { + mOrderedNeedles[needle_data["order"].asInteger()] = new_needle_name; + } + else + { + + mOrderedNeedles[index++] = new_needle_name; + } // [/FIRE-36649] } }