fix UploadImageObjToGpuForRender crash

Signed-off-by: sunfei <sunfei.sun@huawei.com>
Change-Id:  Ie8bfabe8279591a197ddaba2b5595192ec2099de
This commit is contained in:
chenxuankai 2021-11-08 17:29:33 +08:00 committed by sunfei
parent cffe1173d0
commit 1ba205f75f

View File

@ -46,8 +46,8 @@ void ImageProvider::FetchImageObject(
RefPtr<FlutterRenderTaskHolder>& renderTaskHolder,
OnPostBackgroundTask onBackgroundTaskPostCallback)
{
auto task = [ context, imageInfo, successCallback, failedCallback, useSkiaSvg, color, &renderTaskHolder,
uploadSuccessCallback, needAutoResize] () {
auto task = [ context, imageInfo, successCallback, failedCallback, useSkiaSvg, color, renderTaskHolder,
uploadSuccessCallback, needAutoResize] () mutable {
auto pipelineContext = context.Upgrade();
if (!pipelineContext) {
LOGE("pipline context has been released. imageInfo: %{private}s", imageInfo.ToString().c_str());