diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 2706d9c48ab120f4340a602b757629649ebc4b71..af4d1d406b8c105cef9de0178f196887346f4472 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -616,13 +616,13 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem, bool sync) LLFileSystem file(asset_id, LLAssetType::AT_NOTECARD, LLFileSystem::WRITE); if(file.open()) { - LLSaveNotecardInfo* info = new LLSaveNotecardInfo(this, mItemUUID, mObjectUUID, - tid, copyitem); - S32 size = buffer.length() + 1; if(file.write((U8*)buffer.c_str(), size)) { - gAssetStorage->storeAssetData(tid, LLAssetType::AT_NOTECARD, + LLSaveNotecardInfo* info = new LLSaveNotecardInfo(this, mItemUUID, mObjectUUID, + tid, copyitem); + + gAssetStorage->storeAssetData(tid, LLAssetType::AT_NOTECARD, &onSaveComplete, (void*)info, FALSE);