mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 876721 - Allow for failing during creation of ANGLE ShSurf. - r=bjbas
This commit is contained in:
parent
4d089fb324
commit
47b1338caf
@ -232,14 +232,18 @@ SharedSurface_ANGLEShareHandle::Create(GLContext* gl, ID3D10Device1* d3d,
|
||||
// Ok, we have a valid PBuffer with ShareHandle.
|
||||
// Let's attach it to D3D.
|
||||
hr = d3d->OpenSharedResource(shareHandle,
|
||||
__uuidof(ID3D10Texture2D),
|
||||
getter_AddRefs(texture));
|
||||
if (FAILED(hr))
|
||||
__uuidof(ID3D10Texture2D),
|
||||
getter_AddRefs(texture));
|
||||
if (FAILED(hr)) {
|
||||
NS_ERROR("Failed to open shared resource!");
|
||||
goto CleanUpIfFailed;
|
||||
}
|
||||
|
||||
hr = d3d->CreateShaderResourceView(texture, nullptr, getter_AddRefs(srv));
|
||||
if (FAILED(hr))
|
||||
if (FAILED(hr)) {
|
||||
NS_ERROR("Failed to create SRV!");
|
||||
goto CleanUpIfFailed;
|
||||
}
|
||||
|
||||
failed = false;
|
||||
|
||||
@ -247,7 +251,6 @@ CleanUpIfFailed:
|
||||
if (failed) {
|
||||
NS_WARNING("CleanUpIfFailed");
|
||||
egl->fDestroySurface(egl->Display(), pbuffer);
|
||||
MOZ_CRASH();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user