Bug 1272203 (part 3) - Use NotNull in nsContentUtils::GetSurfaceData(). r=froydnj.

This might not look compelling in isolation, but this use of NotNull would have
prevented the null dereference crash in bug 1268721.
This commit is contained in:
Nicholas Nethercote
2016-05-27 09:49:25 +10:00
parent e8a80242c9
commit a70a13fd62
4 changed files with 12 additions and 7 deletions

View File

@@ -990,7 +990,7 @@ PuppetWidget::SetCursor(imgIContainer* aCursor,
size_t length;
int32_t stride;
mozilla::UniquePtr<char[]> surfaceData =
nsContentUtils::GetSurfaceData(dataSurface, &length, &stride);
nsContentUtils::GetSurfaceData(WrapNotNull(dataSurface), &length, &stride);
nsDependentCString cursorData(surfaceData.get(), length);
mozilla::gfx::IntSize size = dataSurface->GetSize();