Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: src/gpu/gl/GrGLEffectMatrix.cpp

Issue 23499013: Fix uninitialized string bug (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Take 2 Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLEffectMatrix.cpp
===================================================================
--- src/gpu/gl/GrGLEffectMatrix.cpp (revision 11179)
+++ src/gpu/gl/GrGLEffectMatrix.cpp (working copy)
@@ -58,6 +58,7 @@
switch (key & kMatrixTypeKeyMask) {
case kIdentity_MatrixType:
fUniType = kVoid_GrSLType;
+ uniName = NULL;
varyingType = kVec2f_GrSLType;
break;
case kTrans_MatrixType:
@@ -79,12 +80,12 @@
GrCrash("Unexpected key.");
}
SkString suffixedUniName;
- if (NULL != suffix) {
- suffixedUniName.append(uniName);
- suffixedUniName.append(suffix);
- uniName = suffixedUniName.c_str();
- }
if (kVoid_GrSLType != fUniType) {
+ if (NULL != suffix) {
+ suffixedUniName.append(uniName);
+ suffixedUniName.append(suffix);
+ uniName = suffixedUniName.c_str();
+ }
fUni = builder->addUniform(GrGLShaderBuilder::kVertex_Visibility,
fUniType,
uniName,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698