Bug 191361 - WebKit part crashes when createNewWindow signal is not connected
Summary: WebKit part crashes when createNewWindow signal is not connected
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: kdewebkit (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: webkit-devel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-02 17:24 UTC by Paweł Prażak
Modified: 2010-11-18 14:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Prażak 2009-05-02 17:24:29 UTC
Version:            (using Devel)
Compiler:          gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291] 
OS:                Linux
Installed from:    Compiled sources

When createNewWindow signal is not connected WebKit part crashes (in debugging code).

I know that browser should connect this signal to work properly, but part should not crash as well.

this is a very simple patch

Index: part/webpage.cpp
===================================================================
--- part/webpage.cpp    (revision 961330)
+++ part/webpage.cpp    (working copy)
@@ -80,7 +80,10 @@
                                                      KParts::WindowArgs(), &part);
     WebKitPart *webKitPart = qobject_cast<WebKitPart*>(part);
     if (!webKitPart) {
-        kDebug() << "got NOT a WebKitPart but a" << part->metaObject()->className();
+        if (part)
+            kDebug() << "got NOT a WebKitPart but a" << part->metaObject()->className();
+        else
+            kDebug() << "part is null";
         return 0;
     }
     return webKitPart->view()->page();
Comment 1 Urs Wolfer 2009-05-02 22:18:30 UTC
SVN commit 962657 by uwolfer:

Prevent crash when part is null.
Patch by Paweł Prażak, thanks.
BUG:191361

 M  +5 -1      webpage.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=962657
Comment 2 Dario Andres 2010-11-18 14:53:08 UTC
[Comment from a bug triager]
Moving old kdewebkit bug reports to kdelibs/kdewebkit. Sorry about the noise