Fix crash when a document cannot be loaded
Fix creating a sprite of 0x0 when there is nothing to export on --sheet