!15817 RSProfiler: Fix for pixelmap [Denis Pavlov]

Merge pull request !15817 from pavlovdenis/pixelmap_gather_fix
This commit is contained in:
openharmony_ci 2024-10-25 02:49:11 +00:00 committed by Gitee
commit 2c0cbc7fce
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -152,6 +152,11 @@ public:
if ((size <= 0) || (size > Rosen::Image::maxSize)) {
return false;
}
if (!image) {
return false;
}
allocType = AllocatorType::HEAP_ALLOC;
base = new (std::nothrow) uint8_t[size];
if (!base) {