summaryrefslogtreecommitdiff
path: root/Applications/DisplaySettings/MonitorWidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Applications/DisplaySettings/MonitorWidget.cpp')
-rw-r--r--Applications/DisplaySettings/MonitorWidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Applications/DisplaySettings/MonitorWidget.cpp b/Applications/DisplaySettings/MonitorWidget.cpp
index cb83eefcd1..0cd87b9cec 100644
--- a/Applications/DisplaySettings/MonitorWidget.cpp
+++ b/Applications/DisplaySettings/MonitorWidget.cpp
@@ -35,10 +35,10 @@ MonitorWidget::MonitorWidget()
bool MonitorWidget::set_wallpaper(String path)
{
- m_desktop_wallpaper_path = path;
auto bitmap_ptr = Gfx::Bitmap::load_from_file(path);
- if (!bitmap_ptr)
+ if (!bitmap_ptr && !path.is_empty())
return false;
+ m_desktop_wallpaper_path = path;
m_desktop_wallpaper_bitmap = bitmap_ptr;
return true;
}