diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-04-30 23:45:22 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-05-05 18:28:08 +0300 |
commit | f73e0d09aabd17f778ce802353dea5c5aae007be (patch) | |
tree | 9bd26aee05f8981fb07c6af0c260bd85d0d36f19 /indra/newview/llinventorymodel.cpp | |
parent | 778a69c6e1783ea6c9c7ac3102990646ff2e38da (diff) |
#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.
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r-- | indra/newview/llinventorymodel.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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<LLSDNotationFormatter>(cat->exportLLSD()) << std::endl; + LLSD sd = LLSD::emptyMap(); + cat->exportLLSD(sd); + fileXML << LLSDOStreamer<LLSDNotationFormatter>(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<LLSDNotationFormatter>(item->asLLSD()) << std::endl; + LLSD sd = LLSD::emptyMap(); + item->asLLSD(sd); + fileXML << LLSDOStreamer<LLSDNotationFormatter>(sd) << std::endl; if (fileXML.fail()) { |