mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1268721 - part 2 - Null check first argument to nsContentUtils::GetSurfaceData(). r=jimm, a=ritu
This commit is contained in:
parent
5b6a77c4b8
commit
4bedd9c01c
@ -7578,6 +7578,9 @@ nsContentUtils::TransferableToIPCTransferable(nsITransferable* aTransferable,
|
||||
}
|
||||
RefPtr<mozilla::gfx::DataSourceSurface> dataSurface =
|
||||
surface->GetDataSurface();
|
||||
if (!dataSurface) {
|
||||
continue;
|
||||
}
|
||||
size_t length;
|
||||
int32_t stride;
|
||||
mozilla::UniquePtr<char[]> surfaceData =
|
||||
|
@ -1001,6 +1001,10 @@ PuppetWidget::SetCursor(imgIContainer* aCursor,
|
||||
|
||||
RefPtr<mozilla::gfx::DataSourceSurface> dataSurface =
|
||||
surface->GetDataSurface();
|
||||
if (!dataSurface) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
size_t length;
|
||||
int32_t stride;
|
||||
mozilla::UniquePtr<char[]> surfaceData =
|
||||
|
@ -51,7 +51,7 @@ nsDragServiceProxy::InvokeDragSessionImpl(nsISupportsArray* aArrayTransferables,
|
||||
RefPtr<mozilla::gfx::DataSourceSurface> dataSurface =
|
||||
surface->GetDataSurface();
|
||||
mozilla::gfx::IntSize size = dataSurface->GetSize();
|
||||
|
||||
if (dataSurface) {
|
||||
size_t length;
|
||||
int32_t stride;
|
||||
mozilla::UniquePtr<char[]> surfaceData =
|
||||
@ -67,6 +67,7 @@ nsDragServiceProxy::InvokeDragSessionImpl(nsISupportsArray* aArrayTransferables,
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mozilla::Unused << child->SendInvokeDragSession(dataTransfers, aActionType,
|
||||
nsCString(),
|
||||
|
Loading…
Reference in New Issue
Block a user