If a uniform was created before, still set the register type index since it can be different.

TRAC #20948
Issue=337
Signed-off-by: Daniel Koch
Author: Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/trunk@1139 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Program.cpp b/src/libGLESv2/Program.cpp
index 25edc50..beb0fae 100644
--- a/src/libGLESv2/Program.cpp
+++ b/src/libGLESv2/Program.cpp
@@ -1921,20 +1921,17 @@
     if (location >= 0)
     {
         delete uniform;
-
-        if (mUniforms[mUniformIndex[location].index]->type != type)
-        {
-            return false;
-        }
-        else
-        {
-            return true;
-        }
+        uniform = mUniforms[mUniformIndex[location].index];
     }
 
     if (shader == GL_FRAGMENT_SHADER) uniform->ps.set(constantDescription);
     if (shader == GL_VERTEX_SHADER)   uniform->vs.set(constantDescription);
 
+    if (location >= 0)
+    {
+        return uniform->type == type;
+    }
+
     mUniforms.push_back(uniform);
     unsigned int uniformIndex = mUniforms.size() - 1;