diff options
Diffstat (limited to 'tests/GLProgramsTest.cpp')
-rw-r--r-- | tests/GLProgramsTest.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp index cfa5561564..4a89d0a9bf 100644 --- a/tests/GLProgramsTest.cpp +++ b/tests/GLProgramsTest.cpp @@ -217,7 +217,9 @@ static void set_random_color_coverage_stages(GrPaint* paint, const float procTreeProbability = 0.5f; if (d->fRandom->nextF() < procTreeProbability) { sk_sp<GrFragmentProcessor> fp(create_random_proc_tree(d, 2, maxTreeLevels)); - paint->addColorFragmentProcessor(std::move(fp)); + if (fp) { + paint->addColorFragmentProcessor(std::move(fp)); + } } else { int numProcs = d->fRandom->nextULessThan(maxStages + 1); int numColorProcs = d->fRandom->nextULessThan(numProcs + 1); |