diff options
author | fluxgen <fluxgen> | 2003-01-01 23:38:03 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-01-01 23:38:03 (GMT) |
commit | 7a36fd6204083661cf0e573e5c4e04b700b8c718 (patch) | |
tree | 6c4f66b72be668a5e78d0dd415d05a9e254ba920 /src/FbTk/RefCount.hh | |
parent | 62fc23f0e3481e38c33ed773f2a540ecf748a70e (diff) | |
download | fluxbox-7a36fd6204083661cf0e573e5c4e04b700b8c718.zip fluxbox-7a36fd6204083661cf0e573e5c4e04b700b8c718.tar.bz2 |
fixed minor bug in operator = Pointer
Diffstat (limited to 'src/FbTk/RefCount.hh')
-rw-r--r-- | src/FbTk/RefCount.hh | 5 |
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> ©) | |||
92 | template <typename Pointer> | 92 | template <typename Pointer> |
93 | RefCount<Pointer> &RefCount<Pointer>::operator = (Pointer *p) { | 93 | RefCount<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 | ||