[calligra] krita/image: Fix crash when updatable rect is empty

Boudewijn Rempt boud at valdyas.org
Thu Jun 9 15:00:16 CEST 2011

On Thursday 09 June 2011 Jun, Dmitry Kazakov wrote:
> Hi, Boud!
> I'm not sure this is a proper place to fix this bug.

I am. The merger shouldn't process empty rects. Unless you want to argue that the merger never should get empty rects in the first place: but even then, the merger should stop processing if it gets an empty rect.

I'm very happy with this first patch from a new contributor, he did a lot of work to trace this issue.

> Because the same bug
> may freely appear in e.g. masks and usual filter application. I wonder why
> the filter doesn't deal with empty application rect well, this is a common
> case for it? I would try to fix the filter first. Did you try it?

It would be good to try and fix all filters so they handle empty rects by returning without doing anything. However, that is something completely separate from making sure the merger doesn't try to merge empty rects.

Boudewijn Rempt | http://www.valdyas.org, http://www.krita.org

More information about the kimageshop mailing list