[PATCH] Fix a crash in KSharedConfigPtr

Boudewijn Rempt boud at valdyas.org
Fri Aug 31 20:22:14 BST 2007


On Fri, 31 Aug 2007, Thiago Macieira wrote:

> On Thursday 30 August 2007 19:52:09 Matthias Kretz wrote:
> > On Thursday 30 August 2007, Alex Merry wrote:
> > > I'm getting a crash in plasma caused by setting a KSharedConfigPtr to 0.
> > > It causes KSharedConfigPtr::attach(0) to be called, and then tries to
> > > dereference p (which is 0).
> > >
> > > This patch should fix it, but I'm not certain it's correct.  Can someone
> > > tell me whether it makes sense?
> >
> > Good catch, your fix is correct. And I think I should document that code a
> > bit more...
> 
> Yes, please. I introduced the crash when I tried to fix KSharedConfigPtr to 
> work with Qt 4.4.

Should this also be fixed in KisSharedPtr?

Boudewijn





More information about the kde-core-devel mailing list