Bug 1380431 - fix DrawTargetCairo::Snapshot error note to check for surface before accessing status. r=mchang

MozReview-Commit-ID: DNTHv4NKjzq
This commit is contained in:
Lee Salzman 2017-07-12 23:38:36 -04:00
Родитель 26b59ebfb5
Коммит f3982ad525
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -703,7 +703,9 @@ already_AddRefed<SourceSurface>
DrawTargetCairo::Snapshot()
{
if (!IsValid()) {
gfxCriticalNote << "DrawTargetCairo::Snapshot with bad surface " << cairo_surface_status(mSurface);
gfxCriticalNote << "DrawTargetCairo::Snapshot with bad surface " << hexa(mSurface)
<< ", context " << hexa(mContext)
<< ", status " << (mSurface ? cairo_surface_status(mSurface) : -1);
return nullptr;
}
if (mSnapshot) {