Bug 1109201 - null-check font within GetFontAt. r=roc a=sylvestre
authorJohn Daggett <jdaggett@mozilla.com>
Sat, 27 Dec 2014 22:23:08 -0500
changeset 235694 5829fa2b02346a4723bddabd704426c00fdcaeb2
parent 235693 0e2a795f927d614ecd6fc787429974e07d39f919
child 235695 7023ec60f4fbcd80b969edcb8d00d0607e055378
push id611
push userraliiev@mozilla.com
push dateMon, 05 Jan 2015 23:23:16 +0000
treeherdermozilla-release@345cd3b9c445 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, sylvestre
bugs1109201
milestone35.0
Bug 1109201 - null-check font within GetFontAt. r=roc a=sylvestre
gfx/thebes/gfxTextRun.cpp
--- a/gfx/thebes/gfxTextRun.cpp
+++ b/gfx/thebes/gfxTextRun.cpp
@@ -1746,17 +1746,17 @@ gfxFontGroup::GetFontAt(int32_t i)
                 }
             }
             fe = ufe->GetPlatformFontEntry();
             if (!fe) {
                 return nullptr;
             }
         }
         font = fe->FindOrMakeFont(&mStyle, mFonts[i].NeedsBold());
-        if (font && !font->Valid()) {
+        if (!font || !font->Valid()) {
             ff.SetInvalid();
             return nullptr;
         }
         mFonts[i].SetFont(font);
     }
     return font.get();
 }