aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/RefCount.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/RefCount.hh')
-rw-r--r--src/FbTk/RefCount.hh5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/FbTk/RefCount.hh b/src/FbTk/RefCount.hh
index f437837..7d131b3 100644
--- a/src/FbTk/RefCount.hh
+++ b/src/FbTk/RefCount.hh
@@ -92,9 +92,8 @@ RefCount<Pointer> &RefCount<Pointer>::operator = (const RefCount<Pointer> &copy)
92template <typename Pointer> 92template <typename Pointer>
93RefCount<Pointer> &RefCount<Pointer>::operator = (Pointer *p) { 93RefCount<Pointer> &RefCount<Pointer>::operator = (Pointer *p) {
94 decRefCount(); 94 decRefCount();
95 m_data = p; 95 m_data = p; // set data pointer
96 if (m_refcount == 0) 96 m_refcount = new unsigned int(0); // create new counter
97 m_refcount = new unsigned int(0);
98 incRefCount(); 97 incRefCount();
99} 98}
100 99