| Index: include/gpu/GrGpuResource.h
|
| diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
|
| index 666ab0d3b65ec8de0ce90063ce75e32a30099451..00a503510712e74901e3455dd69b3c7c138d5700 100644
|
| --- a/include/gpu/GrGpuResource.h
|
| +++ b/include/gpu/GrGpuResource.h
|
| @@ -103,7 +103,8 @@ private:
|
| void didUnref() const {
|
| if (0 == fPendingReads && 0 == fPendingWrites) {
|
| if (0 == fRefCnt) {
|
| - SkDELETE(this);
|
| + // Must call derived destructor since this is not a virtual class.
|
| + SkDELETE(static_cast<const DERIVED*>(this));
|
| } else if (1 == fRefCnt) {
|
| // The one ref is the cache's
|
| static_cast<const DERIVED*>(this)->notifyIsPurgable();
|
|
|