From 09ff7fca62f88791ece6e95f287579687418ba24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Tue, 1 Oct 2013 21:30:07 +0200
Subject: wined3d: Unset some objects in state_init_default.

FIXME: Many more are needed.
FIXME2: Is this still needed?
---
 dlls/wined3d/stateblock.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 606134c..690bcc7 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -1339,7 +1339,15 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d
         state->sampler_states[i][WINED3D_SAMP_ELEMENT_INDEX] = 0;
         /* TODO: Vertex offset in the presampled displacement map. */
         state->sampler_states[i][WINED3D_SAMP_DMAP_OFFSET] = 0;
+        state->textures[i] = NULL;
     }
+
+    state->index_buffer = NULL;
+    for (i = 0; i < sizeof(state->streams) / sizeof(*state->streams); i++)
+        memset(&state->streams[i], 0, sizeof(state->streams[i]));
+
+    state->shader[WINED3D_SHADER_TYPE_VERTEX] = NULL;
+    state->shader[WINED3D_SHADER_TYPE_PIXEL] = NULL;
 }
 
 HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl_info,
-- 
2.1.3

