1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

LibGUI: Use new Bitmap::is_path_a_supported_image_format method

This commit is contained in:
Hüseyin ASLITÜRK 2020-06-15 15:06:39 +03:00 committed by Andreas Kling
parent 3a903babee
commit 0799835e15
2 changed files with 2 additions and 2 deletions

View file

@ -269,7 +269,7 @@ FilePicker::~FilePicker()
void FilePicker::set_preview(const LexicalPath& path)
{
if (path.has_extension(".png")) {
if (Gfx::Bitmap::is_path_a_supported_image_format(path.string())) {
auto bitmap = Gfx::Bitmap::load_from_file(path.string());
if (!bitmap) {
clear_preview();