Prevent division by zero and force ghostscript run
The scale variable can be zero since it's an int. This code should
probably be refactored to use floats, but since no one touched it in
years, this is a quick workaround to not make it crash and to get a
working thumbnail by forcing a ghostscript run with the break;.
BUG: 406463
FIXED-IN: 19.12.1