From 0e95b116fcc7bec1bbdf5f0459ebd464c458f714 Mon Sep 17 00:00:00 2001 From: senorblanco Date: Mon, 20 Apr 2015 15:00:06 -0700 Subject: Speculative fix for ASAN build. Check for NULL GrContext in TessellatingPathRendererTests. Also fix an upload nag (no #includes before GPU #ifdef). TBR=bsalomon@google.com Review URL: https://codereview.chromium.org/1097943004 --- tests/TessellatingPathRendererTests.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp index 0635e7f354..c59d4951fe 100644 --- a/tests/TessellatingPathRendererTests.cpp +++ b/tests/TessellatingPathRendererTests.cpp @@ -5,6 +5,8 @@ * found in the LICENSE file. */ +#include "SkPath.h" + #if SK_SUPPORT_GPU #include "GrContextFactory.h" #include "GrTessellatingPathRenderer.h" @@ -240,6 +242,9 @@ static void test_path(GrDrawTarget* dt, GrRenderTarget* rt, const SkPath& path) DEF_GPUTEST(TessellatingPathRendererTests, reporter, factory) { GrContext* context = factory->get(static_cast(0)); + if (!context) { + return; + } GrSurfaceDesc desc; desc.fFlags = kRenderTarget_GrSurfaceFlag; desc.fWidth = 800; -- cgit v1.2.3