dx9: don't crash if creating a boxart texture fails. log and skip tex
Fix for MINIDUMP-5Q
This commit is contained in:
parent
bbff377ceb
commit
f7e227a4aa
|
@ -65,7 +65,13 @@ public:
|
|||
{
|
||||
ComPtr<IDirect3DTexture9>& texture = textures[name];
|
||||
texture.reset();
|
||||
theDXContext.getDevice()->CreateTexture(width, height, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture.get(), 0);
|
||||
HRESULT hr = theDXContext.getDevice()->CreateTexture(width, height, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture.get(), 0);
|
||||
if (FAILED(hr) || !texture)
|
||||
{
|
||||
WARN_LOG(RENDERER, "CreateTexture failed (%d x %d): error %x", width, height, hr);
|
||||
textures.erase(name);
|
||||
return ImTextureID();
|
||||
}
|
||||
|
||||
width *= 4;
|
||||
|
||||
|
|
Loading…
Reference in New Issue