fixed ASAN error while compiling .fp files

Bug: skia:
Change-Id: I7242986661c42c43616f42e1dfe01266d10109a3
Reviewed-on: https://skia-review.googlesource.com/150916
Auto-Submit: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index a12357e..496e55c 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -1509,7 +1509,6 @@
 }
 
 bool GLSLCodeGenerator::generateCode() {
-    fProgramKind = fProgram.fKind;
     if (fProgramKind != Program::kPipelineStage_Kind) {
         this->writeHeader();
     }
diff --git a/src/sksl/SkSLGLSLCodeGenerator.h b/src/sksl/SkSLGLSLCodeGenerator.h
index 95aa464..bebd76f 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.h
+++ b/src/sksl/SkSLGLSLCodeGenerator.h
@@ -77,7 +77,8 @@
                       OutputStream* out)
     : INHERITED(program, errors, out)
     , fLineEnding("\n")
-    , fContext(*context) {}
+    , fContext(*context)
+    , fProgramKind(program->fKind) {}
 
     bool generateCode() override;