[Kst] Potential crash...

George Staikos staikos at kde.org
Thu Feb 10 21:46:21 CET 2005

On Thursday 10 February 2005 15:55, Andrew Walker wrote:
> There is a potential crash scenario when loading from a .kst file with
> PSDs, Histograms, etc. These objects define a vectag property, a
> vector which must already exist. If this is not the case then a null
> KstVectorPtr results, which is then used in numerous places without
> checking).
> A better approach (instead of loading from the QDomElement in the
> constructor) would be to declare a default constructor and then a
> load(const QDomElement&) function which would return a bool to
> indicate success or failure. If the object fails to load correctly it can
> be deleted and an error message logged. At present Kst would crash.

  Were you able to make it crash?  This should be covered by lazy loading I 
think.  There are known problems with dependency order if you hand-make 
a .kst file, but even calling load() later won't fix that I think.

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

More information about the Kst mailing list