[Fixes bug #1123541] Fix crash when cropping after using the Text Tool.

Also fixed similar crashes when resizing the canvas or image.