[d3d9] Fix crash when using StretchRect with NULL rts

This commit is contained in:
Joshua Ashton 2022-05-10 02:02:35 +01:00
parent 15fa310bb4
commit 5b7406fed5
1 changed files with 3 additions and 0 deletions

View File

@ -944,6 +944,9 @@ namespace dxvk {
Rc<DxvkImage> dstImage = dstTextureInfo->GetImage();
Rc<DxvkImage> srcImage = srcTextureInfo->GetImage();
if (dstImage == nullptr || srcImage == nullptr)
return D3DERR_INVALIDCALL;
const DxvkFormatInfo* dstFormatInfo = imageFormatInfo(dstImage->info().format);
const DxvkFormatInfo* srcFormatInfo = imageFormatInfo(srcImage->info().format);