diff options
author | Brad Kittenbrink <brad@lindenlab.com> | 2022-04-18 13:29:25 -0700 |
---|---|---|
committer | Brad Kittenbrink <brad@lindenlab.com> | 2022-04-18 13:29:25 -0700 |
commit | e9921e77b0a6c66855204db82d56de7925651a4d (patch) | |
tree | 510e353b4e773e18f95bd7312c813189f947dbb6 /indra/newview/llappviewer.cpp | |
parent | efb9df04c3899c269f0c17d2473b4472d5f31ee5 (diff) | |
parent | d031662435d97101411ae990ed85d6e001ab668a (diff) |
Merge remote-tracking branch 'origin/master' into DRTVWR-550-mfa
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d46dc2ff35..38bf2bdf9f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5324,14 +5324,18 @@ void LLAppViewer::disconnectViewer() } // save inventory if appropriate - gInventory.cache(gInventory.getRootFolderID(), gAgent.getID()); - if (gInventory.getLibraryRootFolderID().notNull() - && gInventory.getLibraryOwnerID().notNull()) - { - gInventory.cache( - gInventory.getLibraryRootFolderID(), - gInventory.getLibraryOwnerID()); - } + if (gInventory.isInventoryUsable() + && gAgent.getID().notNull()) // Shouldn't be null at this stage + { + gInventory.cache(gInventory.getRootFolderID(), gAgent.getID()); + if (gInventory.getLibraryRootFolderID().notNull() + && gInventory.getLibraryOwnerID().notNull()) + { + gInventory.cache( + gInventory.getLibraryRootFolderID(), + gInventory.getLibraryOwnerID()); + } + } saveNameCache(); if (LLExperienceCache::instanceExists()) |