Fix #1298071 [[Edit book]: Crash exporting image](https://bugs.launchpad.net/calibre/+bug/1298071)