Verify that the compiler has been initialized before freeing it.

BUG=angle:625

Change-Id: I8bba0dea26eacf02df4568cfb6840aa332bd0df8
Reviewed-on: https://chromium-review.googlesource.com/197655
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/compiler/translator/ShaderLang.cpp b/src/compiler/translator/ShaderLang.cpp
index b98c371..75c97bd 100644
--- a/src/compiler/translator/ShaderLang.cpp
+++ b/src/compiler/translator/ShaderLang.cpp
@@ -63,8 +63,11 @@
 //
 int ShFinalize()
 {
-    DetachProcess();
-    isInitialized = false;
+    if (isInitialized)
+    {
+        DetachProcess();
+        isInitialized = false;
+    }
     return 1;
 }