diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-08-15 19:28:01 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-08-16 03:18:11 +0800 |
commit | 14ba33d1abf9010878a4fd3626d516da6c8919f0 (patch) | |
tree | 2411c65f2bcbe3819efe4b73ad088e13c2c92d53 | |
parent | 83d88f1952047d9d99960cc2702b515782744dfb (diff) | |
download | mupdf-14ba33d1abf9010878a4fd3626d516da6c8919f0.tar.xz |
JS: Push null if image lacks an image mask.
-rw-r--r-- | source/tools/murun.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/tools/murun.c b/source/tools/murun.c index 248a0d68..12c274d1 100644 --- a/source/tools/murun.c +++ b/source/tools/murun.c @@ -2019,7 +2019,10 @@ static void ffi_Image_getImageMask(js_State *J) static void ffi_Image_getMask(js_State *J) { fz_image *image = js_touserdata(J, 0, "fz_image"); - ffi_pushimage(J, image->mask); + if (image->mask) + ffi_pushimage(J, image->mask); + else + js_pushnull(J); } static void ffi_Image_getColorSpace(js_State *J) |