diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llmultisliderctrl.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llagentwearables.cpp | 40 | ||||
-rw-r--r-- | indra/newview/llfavoritesbar.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llfeaturemanager.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llfloatergesture.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llfloaternotificationsconsole.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llfloaterproperties.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llfloatertools.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llgroupmgr.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llpanellandmarkinfo.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llpanelpicks.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llpreviewscript.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llsidepaneliteminfo.cpp | 9 | ||||
-rw-r--r-- | indra/newview/lltoolpie.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewermenufile.cpp | 130 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 7 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 1 |
17 files changed, 173 insertions, 113 deletions
diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp index cb81c39103..50942e55ca 100644 --- a/indra/llui/llmultisliderctrl.cpp +++ b/indra/llui/llmultisliderctrl.cpp @@ -331,6 +331,10 @@ void LLMultiSliderCtrl::updateText() void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata) { LLMultiSliderCtrl* self = dynamic_cast<LLMultiSliderCtrl*>(ctrl->getParent()); + llassert(self); + if (!self) // cast failed - wrong type! :O + return; + if (!ctrl) return; diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 6620780b27..6078620e87 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1290,25 +1290,29 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name, j, new_wearable, todo); - if (isWearableCopyable((EWearableType)type, j)) + llassert(item); + if (item) { - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - folder_id, - new_name, - cb); - } - else - { - move_inventory_item( - gAgent.getID(), - gAgent.getSessionID(), - item->getUUID(), - folder_id, - new_name, - cb); + if (isWearableCopyable((EWearableType)type, j)) + { + copy_inventory_item( + gAgent.getID(), + item->getPermissions().getOwner(), + item->getUUID(), + folder_id, + new_name, + cb); + } + else + { + move_inventory_item( + gAgent.getID(), + gAgent.getSessionID(), + item->getUUID(), + folder_id, + new_name, + cb); + } } } } diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 1e8a739d78..bf7c735488 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1264,8 +1264,11 @@ LLInventoryModel::item_array_t::iterator LLFavoritesBarCtrl::findItemByUUID(LLIn void LLFavoritesBarCtrl::insertBeforeItem(LLInventoryModel::item_array_t& items, const LLUUID& beforeItemId, LLViewerInventoryItem* insertedItem) { LLViewerInventoryItem* beforeItem = gInventory.getItem(beforeItemId); - - items.insert(findItemByUUID(items, beforeItem->getUUID()), insertedItem); + llassert(beforeItem); + if (beforeItem) + { + items.insert(findItemByUUID(items, beforeItem->getUUID()), insertedItem); + } } // EOF diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index fb724f30e0..fbb90c69f3 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -287,6 +287,7 @@ BOOL LLFeatureManager::loadFeatureTables() if (!flp) { LL_ERRS("RenderInit") << "Specified parameter before <list> keyword!" << LL_ENDL; + return FALSE; } S32 available; F32 recommended; diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index b684e1f985..90617a337a 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -427,8 +427,13 @@ void LLFloaterGesture::onClickPlay() BOOL inform_server = TRUE; BOOL deactivate_similar = FALSE; LLGestureManager::instance().setGestureLoadedCallback(item_id, boost::bind(&LLFloaterGesture::playGesture, this, item_id)); - LLGestureManager::instance().activateGestureWithAsset(item_id, gInventory.getItem(item_id)->getAssetUUID(), inform_server, deactivate_similar); - LL_DEBUGS("Gesture")<< "Activating gesture with inventory ID: " << item_id <<LL_ENDL; + LLViewerInventoryItem *item = gInventory.getItem(item_id); + llassert(item); + if (item) + { + LLGestureManager::instance().activateGestureWithAsset(item_id, item->getAssetUUID(), inform_server, deactivate_similar); + LL_DEBUGS("Gesture")<< "Activating gesture with inventory ID: " << item_id <<LL_ENDL; + } } else { @@ -510,15 +515,16 @@ void LLFloaterGesture::onCopyPasteAction(const LLSD& command) if(ids.empty() || !gInventory.isCategoryComplete(mGestureFolderID)) return; LLInventoryCategory* gesture_dir = gInventory.getCategory(mGestureFolderID); + llassert(gesture_dir); LLPointer<GestureCopiedCallback> cb = new GestureCopiedCallback(this); for(LLDynamicArray<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++) { LLInventoryItem* item = gInventory.getItem(*it); - LLStringUtil::format_map_t string_args; - string_args["[COPY_NAME]"] = item->getName(); - if(item && item->getInventoryType() == LLInventoryType::IT_GESTURE) + if(gesture_dir && item && item->getInventoryType() == LLInventoryType::IT_GESTURE) { + LLStringUtil::format_map_t string_args; + string_args["[COPY_NAME]"] = item->getName(); LL_DEBUGS("Gesture")<< "Copying gesture " << item->getName() << " "<< item->getUUID() << " into " << gesture_dir->getName() << " "<< gesture_dir->getUUID() << LL_ENDL; copy_inventory_item(gAgent.getID(), item->getPermissions().getOwner(), item->getUUID(), diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 90db8988b2..94b5ebba00 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -112,10 +112,15 @@ void LLNotificationChannelPanel::onClickNotification(void* user_data) { LLNotificationChannelPanel* self = (LLNotificationChannelPanel*)user_data; if (!self) return; - void* data = self->getChild<LLScrollListCtrl>("notifications_list")->getFirstSelected()->getUserdata(); - if (data) + LLScrollListItem* firstselected = self->getChild<LLScrollListCtrl>("notifications_list")->getFirstSelected(); + llassert(firstselected); + if (firstselected) { - gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE); + void* data = firstselected->getUserdata(); + if (data) + { + gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE); + } } } @@ -124,10 +129,15 @@ void LLNotificationChannelPanel::onClickNotificationReject(void* user_data) { LLNotificationChannelPanel* self = (LLNotificationChannelPanel*)user_data; if (!self) return; - void* data = self->getChild<LLScrollListCtrl>("notification_rejects_list")->getFirstSelected()->getUserdata(); - if (data) + LLScrollListItem* firstselected = self->getChild<LLScrollListCtrl>("notification_rejects_list")->getFirstSelected(); + llassert(firstselected); + if (firstselected) { - gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE); + void* data = firstselected->getUserdata(); + if (data) + { + gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE); + } } } diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index bde86a4034..5c0593ad29 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -880,7 +880,11 @@ void LLFloaterProperties::dirtyAll() iter != inst_list.end(); ++iter) { LLFloaterProperties* floater = dynamic_cast<LLFloaterProperties*>(*iter); - floater->dirty(); + llassert(floater); // else cast failed - wrong type D: + if (floater) + { + floater->dirty(); + } } } diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 4edd09b02c..e2b083a29b 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -666,8 +666,8 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) if (mCheckCopyCenters) mCheckCopyCenters ->setVisible( create_visible ); if (mCheckCopyRotates) mCheckCopyRotates ->setVisible( create_visible ); - if (mCheckCopyCenters) mCheckCopyCenters->setEnabled( mCheckCopySelection->get() ); - if (mCheckCopyRotates) mCheckCopyRotates->setEnabled( mCheckCopySelection->get() ); + if (mCheckCopyCenters && mCheckCopySelection) mCheckCopyCenters->setEnabled( mCheckCopySelection->get() ); + if (mCheckCopyRotates && mCheckCopySelection) mCheckCopyRotates->setEnabled( mCheckCopySelection->get() ); // Land buttons BOOL land_visible = (tool == LLToolBrushLand::getInstance() || tool == LLToolSelectLand::getInstance() ); diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index e65990a095..4db75bbd8a 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -677,9 +677,12 @@ void LLGroupMgrGroupData::sendRoleChanges() break; } case RC_UPDATE_ALL: + // fall through case RC_UPDATE_POWERS: need_power_recalc = true; + // fall through case RC_UPDATE_DATA: + // fall through default: { LLGroupRoleData* group_role_data = (*role_it).second; diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 36a542cfa0..cd6c727b5c 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -406,21 +406,24 @@ void LLPanelLandmarkInfo::populateFoldersList() // Put the "Landmarks" folder first in list. LLUUID landmarks_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); - const LLViewerInventoryCategory* cat = gInventory.getCategory(landmarks_id); - if (!cat) + const LLViewerInventoryCategory* lmcat = gInventory.getCategory(landmarks_id); + if (!lmcat) { llwarns << "Cannot find the landmarks folder" << llendl; } - std::string cat_full_name = getFullFolderName(cat); - mFolderCombo->add(cat_full_name, cat->getUUID()); + else + { + std::string cat_full_name = getFullFolderName(lmcat); + mFolderCombo->add(cat_full_name, lmcat->getUUID()); + } typedef std::vector<folder_pair_t> folder_vec_t; folder_vec_t folders; // Sort the folders by their full name. for (S32 i = 0; i < cats.count(); i++) { - cat = cats.get(i); - cat_full_name = getFullFolderName(cat); + const LLViewerInventoryCategory* cat = cats.get(i); + std::string cat_full_name = getFullFolderName(cat); folders.push_back(folder_pair_t(cat->getUUID(), cat_full_name)); } sort(folders.begin(), folders.end(), cmp_folders); diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index ada65c98a4..8eb0b69491 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -843,10 +843,13 @@ void LLPanelPicks::onPanelClassifiedClose(LLPanelClassifiedInfo* panel) { LLClassifiedItem* c_item = dynamic_cast<LLClassifiedItem*>( mClassifiedsList->getItemByValue(values[n])); - - c_item->setClassifiedName(panel->getClassifiedName()); - c_item->setDescription(panel->getDescription()); - c_item->setSnapshotId(panel->getSnapshotId()); + llassert(c_item); + if (c_item) + { + c_item->setClassifiedName(panel->getClassifiedName()); + c_item->setDescription(panel->getDescription()); + c_item->setSnapshotId(panel->getSnapshotId()); + } } } } diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index a8feaf690d..3221745fa3 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -661,7 +661,9 @@ void LLScriptEdCore::onBtnDynamicHelp() live_help_floater = new LLFloater(LLSD()); LLUICtrlFactory::getInstance()->buildFloater(live_help_floater, "floater_lsl_guide.xml", NULL); LLFloater* parent = dynamic_cast<LLFloater*>(getParent()); - parent->addDependentFloater(live_help_floater, TRUE); + llassert(parent); + if (parent) + parent->addDependentFloater(live_help_floater, TRUE); live_help_floater->childSetCommitCallback("lock_check", onCheckLock, this); live_help_floater->childSetValue("lock_check", gSavedSettings.getBOOL("ScriptHelpFollowsCursor")); live_help_floater->childSetCommitCallback("history_combo", onHelpComboCommit, this); diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 44348ba429..0275736f6d 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -231,20 +231,23 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // PERMISSIONS LOOKUP // //////////////////////// + llassert(item); + if (!item) return; + // do not enable the UI for incomplete items. BOOL is_complete = item->isComplete(); const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType()); const BOOL is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD); const LLPermissions& perm = item->getPermissions(); const BOOL can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm, - GP_OBJECT_MANIPULATE); + GP_OBJECT_MANIPULATE); const BOOL can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm, - GP_OBJECT_SET_SALE) && + GP_OBJECT_SET_SALE) && !cannot_restrict_permissions; const BOOL is_link = item->getIsLinkType(); const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - bool not_in_trash = item && (item->getUUID() != trash_id) && !gInventory.isObjectDescendentOf(item->getUUID(), trash_id); + bool not_in_trash = (item->getUUID() != trash_id) && !gInventory.isObjectDescendentOf(item->getUUID(), trash_id); // You need permission to modify the object to modify an inventory // item in it. diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index bf1e307d71..fdf9e1df2e 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1485,6 +1485,12 @@ BOOL LLToolPie::pickRightMouseDownCallback() while( object && object->isAttachment()) { object = (LLViewerObject*)object->getParent(); + llassert(object); + } + + if (!object) + { + return TRUE; // unexpected, but escape } // Object is an avatar, so check for mute by id. diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 6bad8843fd..84b270f8cc 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -796,84 +796,88 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt //LLAssetType::EType pref_loc = data->mPreferredLocation; BOOL is_balance_sufficient = TRUE; - if(result >= 0) + if(data) { - LLFolderType::EType dest_loc = (data->mPreferredLocation == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(data->mAssetInfo.mType) : data->mPreferredLocation; - - if (LLAssetType::AT_SOUND == data->mAssetInfo.mType || - LLAssetType::AT_TEXTURE == data->mAssetInfo.mType || - LLAssetType::AT_ANIMATION == data->mAssetInfo.mType) + if (result >= 0) { - // Charge the user for the upload. - LLViewerRegion* region = gAgent.getRegion(); - - if(!(can_afford_transaction(expected_upload_cost))) - { - LLFloaterBuyCurrency::buyCurrency( - llformat(LLTrans::getString("UploadingCosts").c_str(), - data->mAssetInfo.getName().c_str()), - expected_upload_cost); - is_balance_sufficient = FALSE; - } - else if(region) + LLFolderType::EType dest_loc = (data->mPreferredLocation == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(data->mAssetInfo.mType) : data->mPreferredLocation; + + if (LLAssetType::AT_SOUND == data->mAssetInfo.mType || + LLAssetType::AT_TEXTURE == data->mAssetInfo.mType || + LLAssetType::AT_ANIMATION == data->mAssetInfo.mType) { - // Charge user for upload - gStatusBar->debitBalance(expected_upload_cost); + // Charge the user for the upload. + LLViewerRegion* region = gAgent.getRegion(); - LLMessageSystem* msg = gMessageSystem; - msg->newMessageFast(_PREHASH_MoneyTransferRequest); - msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - msg->nextBlockFast(_PREHASH_MoneyData); - msg->addUUIDFast(_PREHASH_SourceID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_DestID, LLUUID::null); - msg->addU8("Flags", 0); - // we tell the sim how much we were expecting to pay so it - // can respond to any discrepancy - msg->addS32Fast(_PREHASH_Amount, expected_upload_cost); - msg->addU8Fast(_PREHASH_AggregatePermNextOwner, (U8)LLAggregatePermissions::AP_EMPTY); - msg->addU8Fast(_PREHASH_AggregatePermInventory, (U8)LLAggregatePermissions::AP_EMPTY); - msg->addS32Fast(_PREHASH_TransactionType, TRANS_UPLOAD_CHARGE); - msg->addStringFast(_PREHASH_Description, NULL); - msg->sendReliable(region->getHost()); + if(!(can_afford_transaction(expected_upload_cost))) + { + LLFloaterBuyCurrency::buyCurrency( + llformat(LLTrans::getString("UploadingCosts").c_str(), + data->mAssetInfo.getName().c_str()), + expected_upload_cost); + is_balance_sufficient = FALSE; + } + else if(region) + { + // Charge user for upload + gStatusBar->debitBalance(expected_upload_cost); + + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_MoneyTransferRequest); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_MoneyData); + msg->addUUIDFast(_PREHASH_SourceID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_DestID, LLUUID::null); + msg->addU8("Flags", 0); + // we tell the sim how much we were expecting to pay so it + // can respond to any discrepancy + msg->addS32Fast(_PREHASH_Amount, expected_upload_cost); + msg->addU8Fast(_PREHASH_AggregatePermNextOwner, (U8)LLAggregatePermissions::AP_EMPTY); + msg->addU8Fast(_PREHASH_AggregatePermInventory, (U8)LLAggregatePermissions::AP_EMPTY); + msg->addS32Fast(_PREHASH_TransactionType, TRANS_UPLOAD_CHARGE); + msg->addStringFast(_PREHASH_Description, NULL); + msg->sendReliable(region->getHost()); + } } - } - if(is_balance_sufficient) - { - // Actually add the upload to inventory - llinfos << "Adding " << uuid << " to inventory." << llendl; - const LLUUID folder_id = gInventory.findCategoryUUIDForType(dest_loc); - if(folder_id.notNull()) + if(is_balance_sufficient) { - U32 next_owner_perms = data->mNextOwnerPerm; - if(PERM_NONE == next_owner_perms) + // Actually add the upload to inventory + llinfos << "Adding " << uuid << " to inventory." << llendl; + const LLUUID folder_id = gInventory.findCategoryUUIDForType(dest_loc); + if(folder_id.notNull()) { - next_owner_perms = PERM_MOVE | PERM_TRANSFER; + U32 next_owner_perms = data->mNextOwnerPerm; + if(PERM_NONE == next_owner_perms) + { + next_owner_perms = PERM_MOVE | PERM_TRANSFER; + } + create_inventory_item(gAgent.getID(), gAgent.getSessionID(), + folder_id, data->mAssetInfo.mTransactionID, data->mAssetInfo.getName(), + data->mAssetInfo.getDescription(), data->mAssetInfo.mType, + data->mInventoryType, NOT_WEARABLE, next_owner_perms, + LLPointer<LLInventoryCallback>(NULL)); + } + else + { + llwarns << "Can't find a folder to put it in" << llendl; } - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - folder_id, data->mAssetInfo.mTransactionID, data->mAssetInfo.getName(), - data->mAssetInfo.getDescription(), data->mAssetInfo.mType, - data->mInventoryType, NOT_WEARABLE, next_owner_perms, - LLPointer<LLInventoryCallback>(NULL)); - } - else - { - llwarns << "Can't find a folder to put it in" << llendl; } } - } - else // if(result >= 0) - { - LLSD args; - args["FILE"] = LLInventoryType::lookupHumanReadable(data->mInventoryType); - args["REASON"] = std::string(LLAssetStorage::getErrorString(result)); - LLNotificationsUtil::add("CannotUploadReason", args); + else // if(result >= 0) + { + LLSD args; + args["FILE"] = LLInventoryType::lookupHumanReadable(data->mInventoryType); + args["REASON"] = std::string(LLAssetStorage::getErrorString(result)); + LLNotificationsUtil::add("CannotUploadReason", args); + } } LLUploadDialog::modalUploadFinished(); delete data; + data = NULL; // *NOTE: This is a pretty big hack. What this does is check the // file picker if there are any more pending uploads. If so, diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index cf0808ea5b..2235618573 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1492,9 +1492,9 @@ BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename) //------------------------------------------------------------------------- // parse the file //------------------------------------------------------------------------- - BOOL success = sSkeletonXMLTree.parseFile( filename, FALSE ); + BOOL parsesuccess = sSkeletonXMLTree.parseFile( filename, FALSE ); - if (!success) + if (!parsesuccess) { llerrs << "Can't parse skeleton file: " << filename << llendl; return FALSE; @@ -1505,11 +1505,13 @@ BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename) if (!root) { llerrs << "No root node found in avatar skeleton file: " << filename << llendl; + return FALSE; } if( !root->hasName( "linden_skeleton" ) ) { llerrs << "Invalid avatar skeleton file header: " << filename << llendl; + return FALSE; } std::string version; @@ -1517,6 +1519,7 @@ BOOL LLVOAvatar::parseSkeletonFile(const std::string& filename) if( !root->getFastAttributeString( version_string, version ) || (version != "1.0") ) { llerrs << "Invalid avatar skeleton file version: " << version << " in file: " << filename << llendl; + return FALSE; } return TRUE; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index bd22fc5f2e..dd9634a234 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1355,6 +1355,7 @@ void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep) if (!drawablep) { llerrs << "updateMove called with NULL drawablep" << llendl; + return; } if (drawablep->isState(LLDrawable::EARLY_MOVE)) { |