28 lines
820 B
Diff
28 lines
820 B
Diff
commit 65464349951e0df9b5d80c2eb3cc7458d54923ae
|
|
Author: David Faure <faure@kde.org>
|
|
Date: Fri Oct 19 11:33:41 2012 +0200
|
|
|
|
Fix crash when trying to reuse a frame with a null part.
|
|
|
|
BUG: 271528
|
|
FIXED-IN: 4.9.3
|
|
|
|
diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp
|
|
index ad00ea5..6165710 100644
|
|
--- a/khtml/khtml_part.cpp
|
|
+++ b/khtml/khtml_part.cpp
|
|
@@ -5242,8 +5242,12 @@ KHTMLPart* KHTMLPartPrivate::top()
|
|
|
|
bool KHTMLPartPrivate::canNavigate(KParts::ReadOnlyPart* bCand)
|
|
{
|
|
+ if (!bCand) // No part here (e.g. invalid url), reuse that frame
|
|
+ return true;
|
|
+
|
|
KHTMLPart* b = qobject_cast<KHTMLPart*>(bCand);
|
|
- assert(b);
|
|
+ if (!b) // Another kind of part? Not sure what to do...
|
|
+ return false;
|
|
|
|
// HTML5 gives conditions for this (a) being able to navigate b
|
|
|