Bug 134232

Summary: [patch] crash on http://jdprofessionaltraining.com/help.htm JS deletes iframe I think
Product: [Applications] konqueror Reporter: Fredrik Johansson <fredrik>
Component: khtml partAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED WORKSFORME    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Fredrik Johansson 2006-09-17 22:02:17 UTC
Version:           r585455 kde 3.5 branch (using KDE Devel)
Installed from:    Compiled sources
Compiler:          g++4.0.3 Kubuntu dapper x86_64 
OS:                Linux

I get a crash when I visit http://jdprofessionaltraining.com/help.htm
You have to wait a long time for it to load.

I think what happens is that a iframe is innerHTMLed away before the images is loaded.

In any case I did a patch, it seems to work.
I attached it here so people can review it

Index: khtml_part.cpp
===================================================================
--- khtml_part.cpp      (revision 585455)
+++ khtml_part.cpp      (working copy)
@@ -2285,6 +2285,10 @@
   //kdDebug(6050) << this << " asks the view to emit completed. pendingAction=" << pendingAction << endl;
   d->m_view->complete( pendingAction );

+  // this frame might already have been deleted when we get here
+  if(!d || !d->m_view)
+     return;
+
   // find the alternate stylesheets
   QStringList sheets;
   if (d->m_doc)
Comment 1 Fredrik Johansson 2008-06-22 17:30:13 UTC
Hum I obviously forgot this bug.
But it works in kde 4.0.5

closing..