Bug 1251241 - return from DrawTargetCairo::FillGlyphs if |aFont| is nullptr. r=roc
authorBogdan Postelnicu <bogdan.postelnicu@softvision.ro>
Thu, 25 Feb 2016 16:59:34 +0200
changeset 321968 8fc40777e0aaa781847a4d8de225dbd951d68dbd
parent 321967 5f2b6a81e84a0a88ad514809d8f0dd60fcdbf21a
child 321969 525acdb20f3ae457cd7d05e2a4c4fafa63dab73d
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1251241
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1251241 - return from DrawTargetCairo::FillGlyphs if |aFont| is nullptr. r=roc MozReview-Commit-ID: 56RQO8Fm2AP
gfx/2d/DrawTargetCairo.cpp
--- a/gfx/2d/DrawTargetCairo.cpp
+++ b/gfx/2d/DrawTargetCairo.cpp
@@ -1285,16 +1285,17 @@ DrawTargetCairo::FillGlyphs(ScaledFont *
 
   if (!IsValid()) {
     gfxDebug() << "FillGlyphs bad surface " << cairo_surface_status(cairo_get_group_target(mContext));
     return;
   }
 
   if (!aFont) {
     gfxDevCrash(LogReason::InvalidFont) << "Invalid scaled font";
+    return;
   }
 
   AutoPrepareForDrawing prep(this, mContext);
   AutoClearDeviceOffset clear(aPattern);
 
   ScaledFontBase* scaledFont = static_cast<ScaledFontBase*>(aFont);
   cairo_set_scaled_font(mContext, scaledFont->GetCairoScaledFont());