made data images freeze as well

This commit is contained in:
AT
2020-01-03 22:33:00 +02:00
parent 05bd32f750
commit fd59088528

View File

@@ -100,7 +100,9 @@ namespace Wox.Infrastructure.Image
if (path.StartsWith("data:", StringComparison.OrdinalIgnoreCase)) if (path.StartsWith("data:", StringComparison.OrdinalIgnoreCase))
{ {
return new ImageResult(new BitmapImage(new Uri(path)), ImageType.Data); var imageSource = new BitmapImage(new Uri(path));
imageSource.Freeze();
return new ImageResult(imageSource, ImageType.Data);
} }
if (!Path.IsPathRooted(path)) if (!Path.IsPathRooted(path))