Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 68b5cb4

Browse files
committed
Revert "[ CID 15998 ] libgraphics: image.cpp: Dereference before null check in MCGImageCreateWithSkBitmap"
This reverts commit 3077045.
1 parent 3077045 commit 68b5cb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libgraphics/src/image.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ bool MCGImageCreateWithSkBitmap(const SkBitmap &p_bitmap, MCGImageRef &r_image)
4747
if (t_success)
4848
{
4949
t_bitmap = new SkBitmap(p_bitmap);
50+
t_bitmap -> lockPixels();
5051
t_success = nil != t_bitmap;
5152
}
5253

5354
if (t_success)
5455
{
55-
t_bitmap -> lockPixels();
5656
t_image -> bitmap = t_bitmap;
5757
t_image -> is_valid = true;
5858
t_image -> references = 1;

0 commit comments

Comments
 (0)