[patch] to bug 88243

Koos Vriezen koos.vriezen at xs4all.nl
Fri Feb 11 00:06:22 GMT 2005


On Fri, Feb 11, 2005 at 01:00:10AM +0100, Paul Temple wrote:
> Koos Vriezen wrote:
> > On Fri, Feb 11, 2005 at 12:16:35AM +0100, Paul Temple wrote:
> > > > Looks to me you take an adress of a temporary with
> > > >   Node* myNode = &(toNode(args[0]));
> > > > that should be written as
> > > >   Node myNode = toNode(args[0]);
> > > > which also looks a lot less scary :-)
> > >
> > > Yes, there are warnings, but _I_ (unlike the compiler) know
> > > that I don't do any harm... :)
> >
> > And I know that you do :-)
> > toNode returns a DOM::Node, that's an object. This object is
> > immediately destroyed after the assignment (the = operation).
> 
> Hm, I'll read a chapter about that - though it was totally 
> different...

Burn it then

> Attached a revised patch

I leave that to the khtml guru's to comment. I do suspect that checking
for 'node->handle()' is one of them in case append/remove/replace fails.


Koos




More information about the kfm-devel mailing list