mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 15:49:15 +00:00
LibWeb: Don't crash when creating empty bitmap from a HTMLCanvasElement
This commit is contained in:
parent
bd83f5bde6
commit
48417152df
Notes:
github-actions[bot]
2025-07-20 04:28:03 +00:00
Author: https://github.com/tcl3
Commit: 48417152df
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5527
Reviewed-by: https://github.com/shannonbooth ✅
10 changed files with 527 additions and 2 deletions
|
@ -143,8 +143,8 @@ void ImageBitmap::close()
|
|||
void ImageBitmap::set_bitmap(RefPtr<Gfx::Bitmap> bitmap)
|
||||
{
|
||||
m_bitmap = move(bitmap);
|
||||
m_width = m_bitmap->width();
|
||||
m_height = m_bitmap->height();
|
||||
m_width = m_bitmap ? m_bitmap->width() : 0;
|
||||
m_height = m_bitmap ? m_bitmap->height() : 0;
|
||||
}
|
||||
|
||||
Gfx::Bitmap* ImageBitmap::bitmap() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue