Fix missing height check found by /analyze
A recent run of the experimental VC++ /analyze builder gave this warning: skia\src\gpu\gl\grglgpu.cpp(851) : warning C6287: Redundant code: the left and right sub-expressions are identical. The code it complained about was this: if (width < 0 || width < 0) { which was introduced in https://skia-review.googlesource.com/c/20445/ This change makes the obvious fix. Change-Id: I9d1743293fac9dd15ed82cf85efef907d727921e Reviewed-on: https://skia-review.googlesource.com/21620 Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Bruce Dawson <brucedawson@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
This commit is contained in:
parent
39e085559d
commit
71479b7922
@ -848,7 +848,7 @@ bool GrGLGpu::onTransferPixels(GrTexture* texture,
|
||||
rowBytes = trimRowBytes;
|
||||
}
|
||||
const void* pixels = (void*)offset;
|
||||
if (width < 0 || width < 0) {
|
||||
if (width < 0 || height < 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user