diff options
Diffstat (limited to 'emulator/opengl/shared/emugl/common/smart_ptr.cpp')
-rw-r--r-- | emulator/opengl/shared/emugl/common/smart_ptr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/emulator/opengl/shared/emugl/common/smart_ptr.cpp b/emulator/opengl/shared/emugl/common/smart_ptr.cpp index 9ac7339..703487d 100644 --- a/emulator/opengl/shared/emugl/common/smart_ptr.cpp +++ b/emulator/opengl/shared/emugl/common/smart_ptr.cpp @@ -101,8 +101,10 @@ void* SmartPtrBase::release() { mPtr = NULL; mRefCount = NULL; - if (old_refcount->decrement()) + if (old_refcount->decrement()) { + delete old_refcount; return old_ptr; + } } return NULL; |