Bug 1058853 - Don't break the gallery if we have corrupt images

This change should not be needed either, if you use the error callback instead of passing null metadata.