[calligra/krita-iterators2-rempt] krita/image/tiles3: Handle the situation where the ng iterators get an empty stretch

Boudewijn Rempt boud at valdyas.org
Fri Apr 27 08:10:20 UTC 2012


On Thursday 26 April 2012 Apr, Cyrille Berger Skott wrote:
> On Thursday 26 Apr 2012, Boudewijn Rempt wrote:
> > One other idea I had today was make the createIterator methods in
> > KisPaintDevice return 0 if there's nothing to iterate over. After all, we
> > pass shared pointers to iterators around now, so that makes it already
> > actually necessary for the code to check whether we've got a real
> > iterator.
> I am not sure if I see the benefit. Instead of an assert, you get a crash. A 
> crash that you cannot avoid in a release build.

Well, it makes for an easy check... And it turns out that users don't get release builds from distributions: https://bugs.kde.org/show_bug.cgi?id=298879 -- at least *buntu ships with asserts enabled...

-- 
Boudewijn Rempt
http://www.valdyas.org, http://www.krita.org, http://www.boudewijnrempt.nl


More information about the kimageshop mailing list