catch an explicit null dereference
This commit is contained in:
@@ -99,6 +99,9 @@ namespace OpenRA.FileFormats
|
|||||||
|
|
||||||
case "IEND":
|
case "IEND":
|
||||||
{
|
{
|
||||||
|
if (bitmap == null)
|
||||||
|
throw new InvalidDataException("Image header not found.");
|
||||||
|
|
||||||
var bits = bitmap.LockBits(bitmap.Bounds(),
|
var bits = bitmap.LockBits(bitmap.Bounds(),
|
||||||
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
|
ImageLockMode.WriteOnly, PixelFormat.Format8bppIndexed);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user