Check Empty image path to avoid exception

This commit is contained in:
Kevin Zhang 2021-07-03 20:35:22 +08:00
parent d6ec4b51d5
commit 12b2d653f6

View file

@ -565,7 +565,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
}
else
{
ProgramLogger.LogException($"|UWP|ImageFromPath|{path}" +
ProgramLogger.LogException($"|UWP|ImageFromPath|{(string.IsNullOrEmpty(path) ? "Not Avaliable" : path)}" +
$"|Unable to get logo for {UserModelId} from {path} and" +
$" located in {Package.Location}", new FileNotFoundException());
return new BitmapImage(new Uri(Constant.MissingImgIcon));