Check if FilterNodeCapture was able to successfully validate (bug 1447428, r=bas)

--HG--
extra : rebase_source : e236b64a6733cddfb43caf83373dc8e874bcfb42
This commit is contained in:
Ryan Hunt 2018-03-26 12:48:57 -05:00
Родитель a86c2a4a02
Коммит c371c4f33a
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -240,6 +240,13 @@ public:
RefPtr<FilterNode> filter = mFilter;
if (mFilter->GetBackendType() == FilterBackend::FILTER_BACKEND_CAPTURE) {
filter = static_cast<FilterNodeCapture*>(filter.get())->Validate(aDT);
// This can happen if the FilterNodeCapture is unable to create a
// backing FilterNode on the target backend. Normally this would be
// handled by the painting code, but here there's not much we can do.
if (!filter) {
return;
}
}
aDT->DrawFilter(filter, mSourceRect, mDestPoint, mOptions);
}