aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/utils/win/SkTScopedComPtr.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/win/SkTScopedComPtr.h b/src/utils/win/SkTScopedComPtr.h
index 5410f5c992..105b6017da 100644
--- a/src/utils/win/SkTScopedComPtr.h
+++ b/src/utils/win/SkTScopedComPtr.h
@@ -57,11 +57,11 @@ public:
T *get() const { return fPtr; }
- void reset() {
- if (this->fPtr) {
- this->fPtr->Release();
- this->fPtr = nullptr;
+ void reset(T* ptr = nullptr) {
+ if (fPtr) {
+ fPtr->Release();
}
+ fPtr = ptr;
}
void swap(SkTScopedComPtr<T>& that) {