Fixed leaking of pixel shader object in D3D renderer (thanks, Peter!).

Fixes Bugzilla #2047.