Bugfix: [ 541846 ] SmartPtr and COMRefCounted

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@317 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
syntheticpp 2005-10-21 14:17:46 +00:00
parent 1d868173c2
commit f682afc33b

View file

@ -234,12 +234,17 @@ namespace Loki
static P Clone(const P& val) static P Clone(const P& val)
{ {
val->AddRef(); if(val!=0)
val->AddRef();
return val; return val;
} }
static bool Release(const P& val) static bool Release(const P& val)
{ val->Release(); return false; } {
if(val!=0)
val->Release();
return false;
}
enum { destructiveCopy = false }; enum { destructiveCopy = false };