summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-26 04:15:21 +0000
committerojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-26 04:15:21 +0000
commitd86dd923219ed3166a658ce8809cdfe3682ec443 (patch)
treebf64c6532e8b96996912ebcd9008ae875eaf2b3c
parentde592d31b3e82b1ff938c46f3db8cb06a716062e (diff)
downloadchromium_src-d86dd923219ed3166a658ce8809cdfe3682ec443.zip
chromium_src-d86dd923219ed3166a658ce8809cdfe3682ec443.tar.gz
chromium_src-d86dd923219ed3166a658ce8809cdfe3682ec443.tar.bz2
Speculative fix for http://b/issue?id=1377375 (crashing bug when opening a popup).
I wasn't able to repro the bug, but I've spent far too long trying to do so already. This seems like the right fix. Will wait to see that it actually fixes the crash in the wild and then upstream the change to webkit. Review URL: http://codereview.chromium.org/4102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2626 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/pending/CSSFontSelector.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/webkit/pending/CSSFontSelector.cpp b/webkit/pending/CSSFontSelector.cpp
index 52066a1..5c386bf 100644
--- a/webkit/pending/CSSFontSelector.cpp
+++ b/webkit/pending/CSSFontSelector.cpp
@@ -348,7 +348,12 @@ FontData* CSSFontSelector::getFontData(const FontDescription& fontDescription, c
if (!face) {
// If we were handed a generic family, but there was no match, go ahead and return the correct font based off our
// settings.
- const Settings* settings = m_document->frame()->settings();
+
+ const Frame* frame = m_document->frame();
+ if (!frame)
+ return 0;
+
+ const Settings* settings = frame->settings();
AtomicString genericFamily;
if (familyName == "-webkit-serif")
genericFamily = settings->serifFontFamily();