#3452 Crash in LLSaleInfo::asLLSD()
parent
5af750a130
commit
ad30637ebe
|
|
@ -918,7 +918,7 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const
|
|||
}
|
||||
//sd[INV_FLAGS_LABEL] = (S32)mFlags;
|
||||
sd[INV_FLAGS_LABEL] = ll_sd_from_U32(mFlags);
|
||||
sd[INV_SALE_INFO_LABEL] = mSaleInfo;
|
||||
sd[INV_SALE_INFO_LABEL] = mSaleInfo.asLLSD();
|
||||
sd[INV_NAME_LABEL] = mName;
|
||||
sd[INV_DESC_LABEL] = mDescription;
|
||||
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
|
||||
|
|
|
|||
|
|
@ -89,8 +89,14 @@ bool LLSaleInfo::exportLegacyStream(std::ostream& output_stream) const
|
|||
|
||||
LLSD LLSaleInfo::asLLSD() const
|
||||
{
|
||||
LLSD sd = LLSD();
|
||||
sd["sale_type"] = lookup(mSaleType);
|
||||
LLSD sd;
|
||||
const char* type = lookup(mSaleType);
|
||||
if (!type)
|
||||
{
|
||||
LL_WARNS_ONCE() << "Unknown sale type: " << mSaleType << LL_ENDL;
|
||||
type = lookup(LLSaleInfo::FS_NOT);
|
||||
}
|
||||
sd["sale_type"] = type;
|
||||
sd["sale_price"] = mSalePrice;
|
||||
return sd;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue