mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibGUI: Bug fix on GUI::Image when image is nullptr
This bug cause to FilePicker crash when second image selected for preview. FilePicker sets bitmap to "nullptr" clear preview.
This commit is contained in:
parent
e1bd815a6a
commit
671560a844
Notes:
sideshowbarker
2024-07-19 05:29:15 +09:00
Author: https://github.com/asliturk Commit: https://github.com/SerenityOS/serenity/commit/671560a8442 Pull-request: https://github.com/SerenityOS/serenity/pull/2606
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ void Image::set_bitmap(const Gfx::Bitmap* bitmap)
|
|||
return;
|
||||
|
||||
m_bitmap = bitmap;
|
||||
if (m_auto_resize)
|
||||
if (m_bitmap && m_auto_resize)
|
||||
set_preferred_size(m_bitmap->width(), m_bitmap->height());
|
||||
|
||||
update();
|
||||
|
|
Loading…
Reference in a new issue