Bug 1251241 - return from DrawTargetCairo::FillGlyphs if |aFont| is nullptr. r?roc
MozReview-Commit-ID: 56RQO8Fm2AP
--- 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());