diff --git a/Common/GPU/D3D11/thin3d_d3d11.cpp b/Common/GPU/D3D11/thin3d_d3d11.cpp index b927382c62..e239fcc395 100644 --- a/Common/GPU/D3D11/thin3d_d3d11.cpp +++ b/Common/GPU/D3D11/thin3d_d3d11.cpp @@ -1347,7 +1347,7 @@ void D3D11DrawContext::BindSamplerStates(int start, int count, SamplerState **st _assert_(start + count <= ARRAY_SIZE(samplers)); for (int i = 0; i < count; i++) { D3D11SamplerState *samp = (D3D11SamplerState *)states[i]; - samplers[i] = samp->ss; + samplers[i] = samp ? samp->ss : nullptr; } context_->PSSetSamplers(start, count, samplers); } diff --git a/Common/GPU/D3D9/thin3d_d3d9.cpp b/Common/GPU/D3D9/thin3d_d3d9.cpp index 449b74b05c..f277d6ae95 100644 --- a/Common/GPU/D3D9/thin3d_d3d9.cpp +++ b/Common/GPU/D3D9/thin3d_d3d9.cpp @@ -530,7 +530,8 @@ public: _assert_(start + count <= MAX_BOUND_TEXTURES); for (int i = 0; i < count; ++i) { D3D9SamplerState *s = static_cast(states[i]); - s->Apply(device_, start + i); + if (s) + s->Apply(device_, start + i); } } void BindVertexBuffers(int start, int count, Buffer **buffers, const int *offsets) override {