Do not return an error when setting a material to NULL.
Fixed access to d3d private data.

4 files changed