[aseprite] 89/134: Minor check in ~ScopedHandle()
Tobias Hansen
thansen at moszumanska.debian.org
Sat Mar 14 17:10:10 UTC 2015
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit a3ffe68f2d6004b8c19ff6909ab394b5a78b210d
Author: David Capello <davidcapello at gmail.com>
Date: Sun Nov 30 21:02:41 2014 -0300
Minor check in ~ScopedHandle()
---
src/she/scoped_handle.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/she/scoped_handle.h b/src/she/scoped_handle.h
index 8c0740e..4e7e1b5 100644
--- a/src/she/scoped_handle.h
+++ b/src/she/scoped_handle.h
@@ -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; }
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list