- fix #7926

- the painting is ended if image cannot be allocated in renderer