kdelibs/khtml/ecma

David Faure dfaure at klaralvdalens-datakonsult.se
Wed Oct 1 20:15:36 CEST 2003


On Wednesday 01 October 2003 01:17, Dirk Mueller wrote:
> On Tuesday 30 September 2003 21:02, David Faure wrote:
> 
> > +
> > +        // Update our document's rendering following the execution of the
> > timeout callback. +        DOM::DocumentImpl *doc =
> > static_cast<DOM::DocumentImpl*>(window->m_part->document().handle()); +    
> >    doc->updateRendering();
> >        }
> >      }
> 
> This code misses null checks for window->m_part and document().handle() -> as 
> this is called from a QTimer timeout this code is rather dangerous. 

window->m_part is checked - at least the way I applied the diff.
if (doc) is probably missing indeed.

> BTW, it would be a lot cleaner to use Document::updateRendering() now that we 
> have it. 

OK, sounds easier indeed :)

-- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions


More information about the Khtml-devel mailing list