aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/SkSLGLSLCodeGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sksl/SkSLGLSLCodeGenerator.cpp')
-rw-r--r--src/sksl/SkSLGLSLCodeGenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index c3168e3ed3..6381acb322 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -736,7 +736,7 @@ void GLSLCodeGenerator::writeIfStatement(const IfStatement& stmt) {
void GLSLCodeGenerator::writeForStatement(const ForStatement& f) {
this->write("for (");
- if (f.fInitializer) {
+ if (f.fInitializer && !f.fInitializer->isEmpty()) {
this->writeStatement(*f.fInitializer);
} else {
this->write("; ");