Otherwise the scale factor becomes NaN, resulting in corrupt output. Fixes #5426.
Attach a file by drag & drop or click to upload