From 71c0318322ce998ea411f343607de524b2058799 Mon Sep 17 00:00:00 2001 From: cku Date: Fri, 28 Apr 2017 11:48:21 +0800 Subject: Bug 1360343 - ensure maskSurface is not null before dereference, since it can be null because of OOM or gfx device reset. r=dvander MozReview-Commit-ID: HX2qsWLZpMg --HG-- extra : rebase_source : 046befc11151461a682842c31e2ce39247a5e1d8 --- gfx/2d/2D.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gfx') diff --git a/gfx/2d/2D.h b/gfx/2d/2D.h index c1fba3463..e2020dc9e 100644 --- a/gfx/2d/2D.h +++ b/gfx/2d/2D.h @@ -488,6 +488,9 @@ public: /** * Returns a DataSourceSurface with the same data as this one, but * guaranteed to have surface->GetType() == SurfaceType::DATA. + * + * The returning surface might be null, because of OOM or gfx device reset. + * The caller needs to do null-check before using it. */ virtual already_AddRefed GetDataSurface() override; -- cgit v1.2.3