diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawable.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 13 |
3 files changed, 27 insertions, 10 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index d60330024a..9fbc3408d7 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -1049,9 +1049,13 @@ LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 dat llassert(mDrawable); llassert(mDrawable->getRegion()); - llassert(mDrawable->getRegion()->getSpatialPartition(mPartitionType)); + LLSpatialPartition *part = mDrawable->getRegion()->getSpatialPartition(mPartitionType); + llassert(part); - mDrawable->getRegion()->getSpatialPartition(mPartitionType)->put(this); + if (part) + { + part->put(this); + } } LLSpatialBridge::~LLSpatialBridge() @@ -1367,10 +1371,14 @@ BOOL LLSpatialBridge::updateMove() { llassert(mDrawable); llassert(mDrawable->getRegion()); - llassert(mDrawable->getRegion()->getSpatialPartition(mPartitionType)); + LLSpatialPartition* part = mDrawable->getRegion()->getSpatialPartition(mPartitionType); + llassert(part); mOctree->balance(); - mDrawable->getRegion()->getSpatialPartition(mPartitionType)->move(this, getSpatialGroup(), TRUE); + if (part) + { + part->move(this, getSpatialGroup(), TRUE); + } return TRUE; } diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 20cb2d3604..3946224c0c 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -2544,8 +2544,12 @@ bool LLInventorySort::operator()(const LLFolderViewItem* const& a, const LLFolde { // *TODO: mantipov: probably it is better to add an appropriate method to LLFolderViewItem // or to LLInvFVBridge - S32 a_sort = (static_cast<const LLItemBridge*>(a->getListener()))->getItem()->getSortField(); - S32 b_sort = (static_cast<const LLItemBridge*>(b->getListener()))->getItem()->getSortField(); + LLViewerInventoryItem* aitem = (static_cast<const LLItemBridge*>(a->getListener()))->getItem(); + LLViewerInventoryItem* bitem = (static_cast<const LLItemBridge*>(b->getListener()))->getItem(); + if (!aitem || !bitem) + return false; + S32 a_sort = aitem->getSortField(); + S32 b_sort = bitem->getSortField(); return a_sort < b_sort; } } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 9cfd5fc3ab..da95eaefca 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2232,7 +2232,10 @@ void LLFolderBridge::determineFolderType() { LLInventoryModel* model = getInventoryModel(); LLViewerInventoryCategory* category = model->getCategory(mUUID); - category->determineFolderType(); + if (category) + { + category->determineFolderType(); + } } } @@ -2503,11 +2506,13 @@ void LLFolderBridge::folderOptionsMenu() if(!model) return; const LLInventoryCategory* category = model->getCategory(mUUID); + if(!category) return; + LLFolderType::EType type = category->getPreferredType(); - const bool is_system_folder = category && LLFolderType::lookupIsProtectedType(type); + const bool is_system_folder = LLFolderType::lookupIsProtectedType(type); // BAP change once we're no longer treating regular categories as ensembles. - const bool is_ensemble = category && (type == LLFolderType::FT_NONE || - LLFolderType::lookupIsEnsembleType(type)); + const bool is_ensemble = (type == LLFolderType::FT_NONE || + LLFolderType::lookupIsEnsembleType(type)); // calling card related functionality for folders. |