mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
commit
10480734f5
@ -314,7 +314,7 @@ void LayeredDrawableDescriptor::InitLayeredParam(std::pair<std::unique_ptr<uint8
|
||||
}
|
||||
auto background = Media::ImageSource::CreateImageSource(backgroundInfo.first.get(), backgroundInfo.second, opts,
|
||||
errorCode);
|
||||
if (errorCode == 0) {
|
||||
if (errorCode == 0 && background) {
|
||||
Media::DecodeOptions decodeOpts;
|
||||
decodeOpts.desiredPixelFormat = Media::PixelFormat::BGRA_8888;
|
||||
auto pixelMapPtr = background->CreatePixelMap(decodeOpts, errorCode);
|
||||
|
Loading…
Reference in New Issue
Block a user