|
@@ -54,8 +54,12 @@ namespace InABox.DynamicGrid
|
|
).Rows.FirstOrDefault();
|
|
).Rows.FirstOrDefault();
|
|
if (image != null)
|
|
if (image != null)
|
|
{
|
|
{
|
|
- var ms = new MemoryStream(image.Get<Document, byte[]>(x => x.Data));
|
|
|
|
- result = new Bitmap(ms);
|
|
|
|
|
|
+ var bytes = image.Get<Document, byte[]>(x => x.Data);
|
|
|
|
+ if (bytes?.Any() == true)
|
|
|
|
+ {
|
|
|
|
+ var ms = new MemoryStream();
|
|
|
|
+ result = new Bitmap(ms);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
return result;
|
|
return result;
|