Reviewed by rwlbuis.
authorkjk <kjk@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Apr 2007 22:42:37 +0000 (22:42 +0000)
committerkjk <kjk@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Apr 2007 22:42:37 +0000 (22:42 +0000)
        Coverity fix. Coverity says:
        "Event var_deref_model: Variable "page" tracked as NULL was passed to a function that dereferences it."

        * platform/Font.cpp:
        (WebCore::Font::glyphDataForCharacter):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20735 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/Font.cpp

index 8e683e7..7d24be7 100644 (file)
@@ -1,5 +1,15 @@
 2007-04-05  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
 
+        Reviewed by rwlbuis.
+
+        Coverity fix. Coverity says:
+        "Event var_deref_model: Variable "page" tracked as NULL was passed to a function that dereferences it."
+
+        * platform/Font.cpp:
+        (WebCore::Font::glyphDataForCharacter):
+
+2007-04-05  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>
+
         Reviewed by darin.
 
         Coverity fix. Coverity says:
index 167816a..b278b3a 100644 (file)
@@ -416,7 +416,7 @@ const GlyphData& Font::glyphDataForCharacter(UChar32 c, const UChar* cluster, un
             // Even system fallback can fail.
             // FIXME: Should the last resort font be used?
             const GlyphData& data = primaryFont()->missingGlyphData();
-            if (!smallCaps)
+            if (!smallCaps && page)
                 page->setGlyphDataForCharacter(c, data.glyph, data.fontData);
             return data;
         }