mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Validate iconPath exists
This commit is contained in:
parent
49d5cd36df
commit
3bd6906c80
1 changed files with 2 additions and 1 deletions
|
|
@ -133,8 +133,9 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
var urlSection = data["InternetShortcut"];
|
||||
|
||||
var iconPath = urlSection?["IconFile"];
|
||||
if (string.IsNullOrEmpty(iconPath))
|
||||
if (!File.Exists(iconPath))
|
||||
{
|
||||
// If the IconFile is missing, throw exception to fallback to the default icon
|
||||
throw new FileNotFoundException("Icon file not specified in Internet shortcut (.url) file.");
|
||||
}
|
||||
hBitmap = GetHBitmap(Path.GetFullPath(iconPath), width, height, options);
|
||||
|
|
|
|||
Loading…
Reference in a new issue