diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2018-09-29 02:44:42 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2018-09-29 02:44:42 +0000 |
commit | acf1c3cd5f989ff0e2a3895f35875c918b4c3eb8 (patch) | |
tree | eec649bf9126f527b3b1f5bb128121e8280a49cc /editor | |
parent | 84c6e11810783388e5be22ab80a5dafe523f20db (diff) | |
download | netpbm-mirror-acf1c3cd5f989ff0e2a3895f35875c918b4c3eb8.tar.gz netpbm-mirror-acf1c3cd5f989ff0e2a3895f35875c918b4c3eb8.tar.xz netpbm-mirror-acf1c3cd5f989ff0e2a3895f35875c918b4c3eb8.zip |
Release 10.47.70
git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@3345 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor')
-rw-r--r-- | editor/pbmmask.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/pbmmask.c b/editor/pbmmask.c index 21ada6b9..25c71226 100644 --- a/editor/pbmmask.c +++ b/editor/pbmmask.c @@ -143,6 +143,11 @@ main(int argc, char * argv[]) { pm_usage( usage ); bits = pbm_readpbm( ifp, &cols, &rows ); + + if (cols == 0 || rows == 0) + pm_error("Image contains no pixels, so there is no such thing " + "as background and foreground"); + pm_close( ifp ); mask = pbm_allocarray( cols, rows ); |