mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1208234: Stop the null pointer crash. r=bas
This commit is contained in:
parent
c027acf669
commit
dd53e02526
@ -64,6 +64,11 @@ SourceSurfaceD2DTarget::GetDataSurface()
|
||||
desc.BindFlags = 0;
|
||||
desc.MiscFlags = 0;
|
||||
|
||||
if (!Factory::GetDirect3D10Device()) {
|
||||
gfxCriticalError() << "Invalid D3D10 device in D2D target surface";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
HRESULT hr = Factory::GetDirect3D10Device()->CreateTexture2D(&desc, nullptr, byRef(dataSurf->mTexture));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
|
Loading…
Reference in New Issue
Block a user