Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 31 additions & 20 deletions indra/newview/llpreviewscript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2707,28 +2707,39 @@ LLLiveLSLSaveData::LLLiveLSLSaveData(const LLUUID& id,
/*static*/
void LLLiveLSLEditor::finishLSLUpload(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response, bool isRunning)
{
LLSD floater_key;
floater_key["taskid"] = taskId;
floater_key["itemid"] = itemId;
// This callback runs directly on the upload coprocedure's fiber
// (AssetInventoryUploadCoproc), not on the main coroutine. The work
// below eventually touches UI (selectFirstError() -> onErrorList() ->
// LLTextBase::reflow() -> LLScriptEditorSyntaxWorker::pump(), which
// takes an LLMutex) and LLMutex asserts/crashes if locked off the main
// coro. Shuttle the whole callback back to the main thread first, via
// LLAppViewer::postToMainCoro() (see llappviewer.h).
LLAppViewer::instance()->postToMainCoro(
[itemId, taskId, newAssetId, response, isRunning]() mutable
{
LLSD floater_key;
floater_key["taskid"] = taskId;
floater_key["itemid"] = itemId;

LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
if (preview)
{
preview->mItem->setAssetUUID(newAssetId);
preview->mScriptEd->setAssetID(newAssetId);
LLLiveLSLEditor* preview = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
if (preview)
{
preview->mItem->setAssetUUID(newAssetId);
preview->mScriptEd->setAssetID(newAssetId);

// Bytecode save completed
if (response["compiled"])
{
preview->callbackLSLCompileSucceeded(taskId, itemId, isRunning);
}
else
{
preview->callbackLSLCompileFailed(response["errors"]);
}
response["is_running"] = isRunning;
preview->sendCompileResults(response);
}
// Bytecode save completed
if (response["compiled"])
{
preview->callbackLSLCompileSucceeded(taskId, itemId, isRunning);
}
else
{
preview->callbackLSLCompileFailed(response["errors"]);
}
response["is_running"] = isRunning;
preview->sendCompileResults(response);
}
});
}

// virtual
Expand Down
2 changes: 1 addition & 1 deletion indra/newview/llviewerwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4873,7 +4873,7 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
{
found = gPipeline.lineSegmentIntersectInWorld(mw_start, mw_end, pick_transparent, pick_rigged, pick_unselectable, pick_reflection_probe,
face_hit, intersection, uv, normal, tangent);
if (found && !pick_transparent)
if (found && !pick_transparent && intersection)
{
gDebugRaycastIntersection = *intersection;
}
Expand Down
Loading