summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index f22be6481a..e20d714a3b 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -310,6 +310,13 @@ void update_texture_fetch()
gTextureList.updateImages(0.10f);
}
+bool finish_force_quit(const LLSD& notification, const LLSD& response)
+{
+ LLAppViewer::instance()->forceQuit();
+ return false;
+}
+
+
void set_flags_and_update_appearance()
{
LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true);
@@ -1827,6 +1834,17 @@ bool idle_startup()
// This method MUST be called before gInventory.findCategoryUUIDForType because of
// gInventory.mIsAgentInvUsable is set to true in the gInventory.buildParentChildMap.
gInventory.buildParentChildMap();
+
+ // If buildParentChildMap succeeded, inventory will now be in
+ // a usable state and gInventory.isInventoryUsable() will be
+ // true.
+
+ // if inventory is unusable, we need to bail out.
+ if (!gInventory.isInventoryUsable())
+ {
+ LLNotificationsUtil::add("InventoryUnusable", LLSD(), LLSD(), &finish_force_quit );
+ }
+
gInventory.createCommonSystemCategories();
// It's debatable whether this flag is a good idea - sets all
@@ -1859,6 +1877,7 @@ bool idle_startup()
display_startup();
LLStartUp::setStartupState( STATE_MISC );
display_startup();
+
return FALSE;
}
@@ -2148,7 +2167,10 @@ bool idle_startup()
if (gAgent.isOutfitChosen() && (wearables_time > max_wearables_time))
{
- LLNotificationsUtil::add("ClothingLoading");
+ if (gInventory.isInventoryUsable())
+ {
+ LLNotificationsUtil::add("ClothingLoading");
+ }
record(LLStatViewer::LOADING_WEARABLES_LONG_DELAY, wearables_time);
LLStartUp::setStartupState( STATE_CLEANUP );
}