Suspicious code in kdebase 3.5.2

David Faure faure at kde.org
Sun Apr 9 23:15:05 BST 2006


On Saturday 08 April 2006 12:40, Brad Hards wrote:
> On Saturday 08 April 2006 18:21 pm, Christoph Bartoschek wrote:
> > - kdialog/kdialog.cpp:135
> >
> > If this is deleted at line 133 you use a freed this pointer here. Can one
> > be sure that no virtual table is checked here?
> This code looks wrong to me, although eventFilter() always does...
Hehe...
Yep. I used deleteLater() now, to make sure we don't run code in a deleted object.

> David: Isn't the delete supposed to be part of the if (id) {} body?

No, it should be done in both cases (we want to show the winId, or embed, the
first dialog that pops up, not any other after that).

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).





More information about the kde-core-devel mailing list