1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:27:45 +00:00

DisplaySettings: Desktop crash when non-image file type is used

If the user selects an non-image file
as their background, then at next
startup the desktop crashes.
This commit is contained in:
Lachlan Jowett 2023-11-05 17:00:22 +11:00 committed by Sam Atkins
parent 1afdf7f3c7
commit 4f5824cbd0

View file

@ -104,7 +104,7 @@ ErrorOr<void> BackgroundSettingsWidget::create_frame()
FileSystemAccessClient::OpenFileOptions options { FileSystemAccessClient::OpenFileOptions options {
.window_title = "Select Wallpaper"sv, .window_title = "Select Wallpaper"sv,
.path = "/res/wallpapers"sv, .path = "/res/wallpapers"sv,
.allowed_file_types = { { GUI::FileTypeFilter::image_files(), GUI::FileTypeFilter::all_files() } } .allowed_file_types = { { GUI::FileTypeFilter::image_files() } }
}; };
auto response = FileSystemAccessClient::Client::the().open_file(window(), options); auto response = FileSystemAccessClient::Client::the().open_file(window(), options);
if (response.is_error()) if (response.is_error())