mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-26 03:35:23 +00:00
Minor check in ~ScopedHandle()
This commit is contained in:
parent
b1d9d82fbf
commit
a3ffe68f2d
@ -14,7 +14,10 @@ namespace she {
|
||||
class ScopedHandle {
|
||||
public:
|
||||
ScopedHandle(T* handle) : m_handle(handle) { }
|
||||
~ScopedHandle() { m_handle->dispose(); }
|
||||
~ScopedHandle() {
|
||||
if (m_handle)
|
||||
m_handle->dispose();
|
||||
}
|
||||
|
||||
T* operator->() { return m_handle; }
|
||||
operator T*() { return m_handle; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user