diff options
| author | Erik Kundiman <erik@megapahit.org> | 2024-09-16 22:43:44 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2024-09-16 22:43:44 +0800 |
| commit | 812bc3c963f0adf6eecf133e0acdf2a7b22b8af6 (patch) | |
| tree | 089a2df57a0303a80a962f13eb6720668cfb5115 /indra/newview/llwearablelist.cpp | |
| parent | 05f6b6c827b4eebbb180483579b7c13ebc156072 (diff) | |
| parent | 94453aecc352613f52fec0e59b23230314cffb32 (diff) | |
Merge remote-tracking branch 'secondlife/release/2024.08-DeltaFPS' into 2024.08-DeltaFPS
Diffstat (limited to 'indra/newview/llwearablelist.cpp')
| -rw-r--r-- | indra/newview/llwearablelist.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 76348d4ea1..2d59712142 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -36,6 +36,7 @@ #include "llnotificationsutil.h" #include "llinventorymodel.h" #include "lltrans.h" +#include "llappviewer.h" // Callback struct struct LLWearableArrivedData @@ -97,6 +98,22 @@ void LLWearableList::getAsset(const LLAssetID& assetID, const std::string& weara // static void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID& uuid, void* userdata, S32 status, LLExtStat ext_status ) { + if (!LLCoros::on_main_coro()) + { + // if triggered from a coroutine, dispatch to main thread before accessing app state + std::string filename_in = filename; + LLUUID uuid_in = uuid; + + LLAppViewer::instance()->postToMainCoro([=]() + { + processGetAssetReply(filename_in.c_str(), uuid_in, userdata, status, ext_status); + }); + + return; + } + + LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; + bool isNewWearable = false; LLWearableArrivedData* data = (LLWearableArrivedData*) userdata; LLViewerWearable* wearable = NULL; // NULL indicates failure |
