diff options
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r-- | indra/newview/llstartup.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 3fb79e4739..9f75e3a36a 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -142,6 +142,7 @@ #include "lltoolmgr.h" #include "lltrans.h" #include "llui.h" +#include "lluiusage.h" #include "llurldispatcher.h" #include "llurlentry.h" #include "llslurl.h" @@ -308,6 +309,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); @@ -1813,6 +1821,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 @@ -1856,6 +1875,7 @@ bool idle_startup() display_startup(); LLStartUp::setStartupState( STATE_MISC ); display_startup(); + return FALSE; } @@ -2149,7 +2169,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 ); } @@ -2263,6 +2286,8 @@ bool idle_startup() gAgentAvatarp->sendHoverHeight(); + LLUIUsage::instance().clear(); + return TRUE; } |