Index: include/gpu/GrGpuResource.h |
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h |
index 364a886408cf841dded13491d811cac14fe3cde1..6f8280acb2173b304305f0a06ae8cca8ca69a980 100644 |
--- a/include/gpu/GrGpuResource.h |
+++ b/include/gpu/GrGpuResource.h |
@@ -58,6 +58,7 @@ public: |
this->validate(); |
if (!(--fRefCnt)) { |
+ SkASSERT(fRefCnt >= 0); |
if (!static_cast<const DERIVED*>(this)->notifyRefCountIsZero()) { |
return; |
} |
@@ -117,6 +118,7 @@ private: |
private: |
void didRemoveRefOrPendingIO(CntType cntTypeRemoved) const { |
+ this->validate(); |
if (0 == fPendingReads && 0 == fPendingWrites && 0 == fRefCnt) { |
static_cast<const DERIVED*>(this)->notifyAllCntsAreZero(cntTypeRemoved); |
} |