fix(image): ignore empty async image provider paths#455
Conversation
Skip image decoding when the parsed provider path is empty. 解析后的图片 Provider 路径为空时跳过解码。 Log: 避免异步图片请求打开空文件名 Influence: 异步图片加载异常路径
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 --- a/src/src/imagedata/imageprovider.cpp
+++ b/src/src/imagedata/imageprovider.cpp
@@ -152,6 +152,10 @@ void AsyncImageResponse::run()
QString tempPath;
int frameIndex;
parseProviderID(providerId, tempPath, frameIndex);
+ if (tempPath.isEmpty()) {
+ emit finished();
+ return;
+ }
// 判断缓存中是否存在图片
image = provider->imageCache.get(tempPath, frameIndex); |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pengfeixx, wyu71 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Skip image decoding when the parsed provider path is empty. 解析后的图片 Provider 路径为空时跳过解码。
Log: 避免异步图片请求打开空文件名
Influence: 异步图片加载异常路径