зеркало из https://github.com/AvaloniaUI/angle.git
angle: fix potential nullptr dereference
`checkIsScalarBool` immediately deref's `typedCond`, which may be NULL. Prevent that. Caught by the static analyzer: > device/generic/vulkan-cereal/third-party/angle/src/compiler/translator/ParseContext.cpp:893:9: warning: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage] Bug: b/206470603 Test: None Change-Id: I2c055d637fb3ef254c0cebfae32bfbe17bf850ea Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3935460 Auto-Submit: Greg Schlomoff <gregschlom@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Родитель
85631d24dd
Коммит
54d094fe1d
|
@ -2671,7 +2671,7 @@ TIntermNode *TParseContext::addLoop(TLoopType type,
|
|||
}
|
||||
if (cond == nullptr || typedCond)
|
||||
{
|
||||
if (type == ELoopDoWhile)
|
||||
if (type == ELoopDoWhile && typedCond)
|
||||
{
|
||||
checkIsScalarBool(line, typedCond);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче