Bug 1167356 - Check return value of DataSourceSurface::Map in RasterImage::CopyFrame. r=Bas
This commit is contained in:
@@ -686,8 +686,11 @@ RasterImage::CopyFrame(uint32_t aWhichFrame, uint32_t aFlags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DataSourceSurface::MappedSurface mapping;
|
DataSourceSurface::MappedSurface mapping;
|
||||||
DebugOnly<bool> success =
|
if (!surf->Map(DataSourceSurface::MapType::WRITE, &mapping)) {
|
||||||
surf->Map(DataSourceSurface::MapType::WRITE, &mapping);
|
gfxCriticalError() << "RasterImage::CopyFrame failed to map surface";
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
NS_ASSERTION(success, "Failed to map surface");
|
NS_ASSERTION(success, "Failed to map surface");
|
||||||
RefPtr<DrawTarget> target =
|
RefPtr<DrawTarget> target =
|
||||||
Factory::CreateDrawTargetForData(BackendType::CAIRO,
|
Factory::CreateDrawTargetForData(BackendType::CAIRO,
|
||||||
|
|||||||
Reference in New Issue
Block a user