Bug 134232 - [patch] crash on http://jdprofessionaltraining.com/help.htm JS deletes iframe I think
Summary: [patch] crash on http://jdprofessionaltraining.com/help.htm JS deletes iframe...
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml part (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-17 22:02 UTC by Fredrik Johansson
Modified: 2008-06-22 17:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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..