aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-03-09 06:25:15 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-09 06:25:16 -0800
commite699d0cd25fd059e3f0c4949e613e50c83a52179 (patch)
treeca881e973092698a1a8d1ad13a8dd912479a596e /src/gpu/vk
parent790f99ae729803ddf827251bbbb9bb21fc165e35 (diff)
Don't allow nullptr in texels array params (unless using a transfer buffer).
Diffstat (limited to 'src/gpu/vk')
-rw-r--r--src/gpu/vk/GrVkGpu.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 1ce78fd192..d357f32e1f 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -542,7 +542,8 @@ GrTexture* GrVkGpu::onCreateTexture(const GrSurfaceDesc& desc, GrGpuResource::Li
}
// TODO: We're ignoring MIP levels here.
- if (!texels.empty() && texels.begin()->fPixels) {
+ if (!texels.empty()) {
+ SkASSERT(texels.begin()->fPixels);
if (!this->uploadTexData(tex, 0, 0, desc.fWidth, desc.fHeight, desc.fConfig,
texels.begin()->fPixels, texels.begin()->fRowBytes)) {
tex->unref();