fix for use of uninit variable
TBR=
BUG=skia:
Review URL: https://codereview.chromium.org/740463002
diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp
index f22b760..2ff410e 100755
--- a/src/gpu/GrBitmapTextContext.cpp
+++ b/src/gpu/GrBitmapTextContext.cpp
@@ -548,12 +548,12 @@
return;
}
- GrDrawState drawState;
- drawState.setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget());
-
- set_vertex_attributes(&drawState, fCurrMaskFormat);
-
if (fCurrVertex > 0) {
+ GrDrawState drawState;
+ drawState.setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget());
+
+ set_vertex_attributes(&drawState, fCurrMaskFormat);
+
// setup our sampler state for our text texture/atlas
SkASSERT(SkIsAlign4(fCurrVertex));
SkASSERT(fCurrTexture);