iff: prevent a possible crash with broken/prepared IFF PBM

Based on fix by Peter Ross for ticket #1054.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
