Fix use-after-move in GrPixmapBase
Fix a use-after-move issue in GrPixmapBase, as found by clang-tidy: gpu/GrPixmap.h:65: 'info' used after it was moved gpu/GrPixmap.h:64: move occurred here Bug: chromium:1122844 Change-Id: I7403805e3e63592119b66c1e5840bc48d5e33832 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/484176 Auto-Submit: Maksim Ivanov <emaxx@chromium.org> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
d26057a2c0
commit
ecbad28361
@ -62,7 +62,7 @@ protected:
|
||||
|
||||
GrPixmapBase(GrImageInfo info, T* addr, size_t rowBytes)
|
||||
: fAddr(addr), fRowBytes(rowBytes), fInfo(std::move(info)) {
|
||||
if (fRowBytes < info.minRowBytes() || !addr) {
|
||||
if (fRowBytes < fInfo.minRowBytes() || !addr) {
|
||||
*this = {};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user