[PATCH] Fix a crash in KSharedConfigPtr

Thiago Macieira thiago at kde.org
Sat Sep 1 18:21:14 BST 2007


Boudewijn Rempt wrote:
>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?

KisSharedPtr is a copy of KSharedPtr. The crash only happened on 
KSharedConfigPtr because it has a special handling against cyclic 
refcounts.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070901/bd76767d/attachment.sig>


More information about the kde-core-devel mailing list