From f73e0d09aabd17f778ce802353dea5c5aae007be Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 30 Apr 2025 23:45:22 +0300 Subject: #3905 Crashes in LLInventoryModel::saveToFile I don't expect it to fix the problem. Just making things more explicit in places of most frequent crashes. --- indra/newview/llinventorymodel.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 0b2615c706..c7cc8f3032 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -3500,7 +3500,9 @@ bool LLInventoryModel::saveToFile(const std::string& filename, { if (cat->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN) { - fileXML << LLSDOStreamer(cat->exportLLSD()) << std::endl; + LLSD sd = LLSD::emptyMap(); + cat->exportLLSD(sd); + fileXML << LLSDOStreamer(sd) << std::endl; cat_count++; } @@ -3514,7 +3516,9 @@ bool LLInventoryModel::saveToFile(const std::string& filename, auto it_count = items.size(); for (auto& item : items) { - fileXML << LLSDOStreamer(item->asLLSD()) << std::endl; + LLSD sd = LLSD::emptyMap(); + item->asLLSD(sd); + fileXML << LLSDOStreamer(sd) << std::endl; if (fileXML.fail()) { -- cgit v1.2.3