icemulti: Refuse to pack empty image

This commit is contained in:
Roland Lutz 2017-08-14 13:10:57 +02:00
parent e9e49bb5db
commit ca90cc78e1
1 changed files with 3 additions and 0 deletions

View File

@ -109,6 +109,9 @@ size_t Image::size()
ifs.seekg (0, ifs.beg);
if (ifs.fail())
error("can't seek on input image `%s': %s\n", filename, strerror(errno));
if (length == 0)
error("input image `%s' doesn't contain any data\n", filename);
return length;
}