aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ProxyRefTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ProxyRefTest.cpp')
-rw-r--r--tests/ProxyRefTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp
index e605716c39..202dd6aeed 100644
--- a/tests/ProxyRefTest.cpp
+++ b/tests/ProxyRefTest.cpp
@@ -54,6 +54,10 @@ static void check_refs(skiatest::Reporter* reporter,
int32_t expectedBackingRefs,
int32_t expectedNumReads,
int32_t expectedNumWrites) {
+ REPORTER_ASSERT(reporter, proxy);
+ if (!proxy) {
+ return;
+ }
REPORTER_ASSERT(reporter, proxy->getProxyRefCnt_TestOnly() == expectedProxyRefs);
REPORTER_ASSERT(reporter, proxy->getBackingRefCnt_TestOnly() == expectedBackingRefs);
REPORTER_ASSERT(reporter, proxy->getPendingReadCnt_TestOnly() == expectedNumReads);