Fix segfault on Harmattan when editing sketches.