summaryrefslogtreecommitdiffstats
path: root/layout/svg/nsSVGMaskFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/svg/nsSVGMaskFrame.cpp')
-rw-r--r--layout/svg/nsSVGMaskFrame.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/layout/svg/nsSVGMaskFrame.cpp b/layout/svg/nsSVGMaskFrame.cpp
index b8e4b32ae..a22833d61 100644
--- a/layout/svg/nsSVGMaskFrame.cpp
+++ b/layout/svg/nsSVGMaskFrame.cpp
@@ -274,7 +274,8 @@ nsSVGMaskFrame::GetMaskForMaskedFrame(gfxContext* aContext,
}
RefPtr<DataSourceSurface> maskSurface = maskSnapshot->GetDataSurface();
DataSourceSurface::MappedSurface map;
- if (!maskSurface->Map(DataSourceSurface::MapType::READ, &map)) {
+ if (!maskSurface ||
+ !maskSurface->Map(DataSourceSurface::MapType::READ, &map)) {
return nullptr;
}