return zero-byte array instead of crashing if there is no bitmap data
This commit is contained in:
parent
8496fd116c
commit
d5cc7a716f
@ -227,9 +227,14 @@ namespace UniversalEditor.ObjectModels.Multimedia.Picture
|
||||
DataRequestEventArgs e = new DataRequestEventArgs();
|
||||
OnDataRequest(e);
|
||||
}
|
||||
if (bitmapData.Length == 0)
|
||||
{
|
||||
return new byte[0];
|
||||
}
|
||||
|
||||
// memory goes from left to right, top to bottom
|
||||
byte[] data = new byte[mvarWidth * mvarHeight * 4];
|
||||
|
||||
int i = 0;
|
||||
for (int h = 0; h < mvarHeight; h++)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user