direct3d11: fix crash when resource allocation fails