git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- disabled gui for a moment
[enigma2.git]
/
lib
/
base
/
smartptr.h
diff --git
a/lib/base/smartptr.h
b/lib/base/smartptr.h
index 85ad5a90f23e5a31238e3dcb201234d3e27e4f1c..aafecf0eacfc169e8fe8c8872c9ea138023bcad5 100644
(file)
--- a/
lib/base/smartptr.h
+++ b/
lib/base/smartptr.h
@@
-43,21
+43,21
@@
public:
}
ePtr &operator=(T *c)
{
}
ePtr &operator=(T *c)
{
+ if (c)
+ c->AddRef();
if (ptr)
ptr->Release();
ptr=c;
if (ptr)
ptr->Release();
ptr=c;
- if (ptr)
- ptr->AddRef();
return *this;
}
ePtr &operator=(ePtr<T> &c)
{
return *this;
}
ePtr &operator=(ePtr<T> &c)
{
+ if (c.ptr)
+ c.ptr->AddRef();
if (ptr)
ptr->Release();
ptr=c.ptr;
if (ptr)
ptr->Release();
ptr=c.ptr;
- if (ptr)
- ptr->AddRef();
return *this;
}
return *this;
}