gifdec: check that w,h is not zero