Fix crash caused by missing shader function definition and report the error.

BUG=17956386

Change-Id: I89f243b557b70401052b1f7db237fbc410386f64
Reviewed-on: https://swiftshader-review.googlesource.com/1190
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: <nicolascapens@google.com>
Reviewed-by: <nicolascapens@google.com>
diff --git a/src/GLES2/compiler/Compiler.cpp b/src/GLES2/compiler/Compiler.cpp
index 7a50274..d1b36c0 100644
--- a/src/GLES2/compiler/Compiler.cpp
+++ b/src/GLES2/compiler/Compiler.cpp
@@ -121,7 +121,7 @@
             intermediate.outputTree(root);
 
         if (success && (compileOptions & SH_OBJECT_CODE))
-            translate(root);
+            success = translate(root);
     }
 
     // Cleanup memory.