Deleting program does not delete shaders that are marked
TRAC #12012
Resolve the crash on context deletion.
Signed-off-by: Nicolas Capens
Signed-off-by: Daniel Koch
Author: Andrew Lewycky
git-svn-id: https://angleproject.googlecode.com/svn/trunk@213 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index 6871067..61ab25a 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -319,11 +319,11 @@
if (type == GL_VERTEX_SHADER)
{
- mShaderMap[handle] = new VertexShader(handle);
+ mShaderMap[handle] = new VertexShader(this, handle);
}
else if (type == GL_FRAGMENT_SHADER)
{
- mShaderMap[handle] = new FragmentShader(handle);
+ mShaderMap[handle] = new FragmentShader(this, handle);
}
else UNREACHABLE();