wined3d: Fix a null pointer dereference.