diff --git a/plugins/win-capture/graphics-hook/d3d10-capture.cpp b/plugins/win-capture/graphics-hook/d3d10-capture.cpp index 657bb557924f0b..dfa23d5e6e18b7 100644 --- a/plugins/win-capture/graphics-hook/d3d10-capture.cpp +++ b/plugins/win-capture/graphics-hook/d3d10-capture.cpp @@ -279,7 +279,9 @@ static inline void d3d10_copy_texture(ID3D10Resource *dst, ID3D10Resource *src) static inline void d3d10_shtex_capture(ID3D10Resource *backbuffer) { - d3d10_copy_texture(data.texture, backbuffer); + if (data.texture) { + d3d10_copy_texture(data.texture, backbuffer); + } } static void d3d10_shmem_capture_copy(int i) diff --git a/plugins/win-capture/graphics-hook/d3d11-capture.cpp b/plugins/win-capture/graphics-hook/d3d11-capture.cpp index 7b5fececb32b11..f45adca9736124 100644 --- a/plugins/win-capture/graphics-hook/d3d11-capture.cpp +++ b/plugins/win-capture/graphics-hook/d3d11-capture.cpp @@ -247,7 +247,9 @@ static inline void d3d11_copy_texture(ID3D11Resource *dst, ID3D11Resource *src) static inline void d3d11_shtex_capture(ID3D11Resource *backbuffer) { - d3d11_copy_texture(data.texture, backbuffer); + if (data.texture) { + d3d11_copy_texture(data.texture, backbuffer); + } } static void d3d11_shmem_capture_copy(int i) diff --git a/plugins/win-capture/graphics-hook/d3d12-capture.cpp b/plugins/win-capture/graphics-hook/d3d12-capture.cpp index 2ddc32582efb7b..c43fba4b41d572 100644 --- a/plugins/win-capture/graphics-hook/d3d12-capture.cpp +++ b/plugins/win-capture/graphics-hook/d3d12-capture.cpp @@ -271,6 +271,10 @@ static inline void d3d12_copy_texture(ID3D11Resource *dst, ID3D11Resource *src) static inline void d3d12_shtex_capture(IDXGISwapChain *swap) { + if (!data.device11on12) { + return; + } + bool dxgi_1_4 = data.dxgi_1_4; UINT cur_idx; diff --git a/shared/obs-hook-config/graphics-hook-ver.h b/shared/obs-hook-config/graphics-hook-ver.h index de783be9ad7cfc..9f730a6e036294 100644 --- a/shared/obs-hook-config/graphics-hook-ver.h +++ b/shared/obs-hook-config/graphics-hook-ver.h @@ -13,7 +13,7 @@ #define HOOK_VER_MAJOR 1 #define HOOK_VER_MINOR 8 -#define HOOK_VER_PATCH 5 +#define HOOK_VER_PATCH 6 #ifndef STRINGIFY #define STRINGIFY(s) #s