Belt and suspenders for colors in DrawAtlasBatch test
authorjvanverth <jvanverth@google.com>
Thu, 13 Aug 2015 20:41:03 +0000 (13:41 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 13 Aug 2015 20:41:03 +0000 (13:41 -0700)
Review URL: https://codereview.chromium.org/1290253002

src/gpu/batches/GrDrawAtlasBatch.cpp

index 28c6922d99fadf4af0a4a6f54b43b28837932a3a..487580c39da73bc837e454eb960c08d2cba423d5 100644 (file)
@@ -251,7 +251,7 @@ DRAW_BATCH_TEST_DEFINE(GrDrawAtlasBatch) {
     GrDrawAtlasBatch::Geometry geometry;
     geometry.fColor = GrRandomColor(random);
     return GrDrawAtlasBatch::Create(geometry, viewMatrix, spriteCount, xforms.begin(),
-                                    texRects.begin(), colors.begin());
+                                    texRects.begin(), hasColors ? colors.begin() : nullptr);
 }
 
 #endif