mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +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
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…
Add table
Add a link
Reference in a new issue