[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Wed Nov 2 00:51:04 CET 2005

On Tuesday 01 November 2005 18:27, Ted Kisner wrote:
> SVN commit 476765 by tskisner:
> Always make sure we have a valid KstMatrix before trying to access or paint
> it.  This fixes the crash on loading a KstImage from a kst file.
>  M  +301 -256  kstimage.cpp

  There is a subtlety with QMap that makes this dangerous.  Testing for null 
with QMap::operator[] creates a new entry in the map if the entry doesn't 
exist.  QMap::contains() is probably a better choice.  Also remember that it 
causes two lookups by doing contains() and then operator[].  In inner loops 
this is very pricey.

George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/

More information about the Kst mailing list