Skip to content

Commit

Permalink
Image: __fromBytes() null and length check to avoid EXC_BAD_ACCESS li…
Browse files Browse the repository at this point in the history
…me::PNG::Decode (closes #1894)
  • Loading branch information
joshtynjala committed Mar 3, 2025
1 parent ebab7dd commit 3aa32e2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lime/graphics/Image.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1483,6 +1483,11 @@ class Image
__fromBase64(Base64.encode(bytes), type, onload);
return true;
#elseif (lime_cffi && !macro)
if (bytes == null || bytes.length == 0)
{
return false;
}

var imageBuffer:ImageBuffer = null;

#if !cs
Expand Down

0 comments on commit 3aa32e2

Please sign in to comment.