From cd5aadc7476cf590f279b9009d03114ae7b07efe Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Fri, 22 Sep 2017 09:50:54 -0700 Subject: [PATCH] Return null image in resizeImage if image is null --- lime/tools/helpers/ImageHelper.hx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lime/tools/helpers/ImageHelper.hx b/lime/tools/helpers/ImageHelper.hx index 441c12386..3cd6ea9fa 100644 --- a/lime/tools/helpers/ImageHelper.hx +++ b/lime/tools/helpers/ImageHelper.hx @@ -16,6 +16,8 @@ class ImageHelper { public static function rasterizeSVG (path:String, width:Int, height:Int, backgroundColor:Int = null):Image { //public static function rasterizeSVG (svg:Dynamic /*SVG*/, width:Int, height:Int, backgroundColor:Int = null):Image { + if (path == null) return null; + var temp = PathHelper.getTemporaryFile (".png"); try { @@ -124,6 +126,8 @@ class ImageHelper { public static function resizeImage (image:Image, width:Int, height:Int):Image { + if (image == null) return null; + if (image.width == width && image.height == height) { return image;