diff options
author | Herbert Duerr <hdu@openoffice.org> | 2004-07-20 08:48:34 +0000 |
---|---|---|
committer | Herbert Duerr <hdu@openoffice.org> | 2004-07-20 08:48:34 +0000 |
commit | 6777bc4ccde3a4b0f1d420648ec91f3bd74139ff (patch) | |
tree | efc54afbdfc11228c8fe6eb97c6f5e49959390fd /vcl/source/gdi/metric.cxx | |
parent | 0d61bb148592b9c068936c94a1692f3fb3d9d55b (diff) |
#i31610# fix refcount on ImplFontCharmap
Diffstat (limited to 'vcl/source/gdi/metric.cxx')
-rw-r--r-- | vcl/source/gdi/metric.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx index f43942b2582b..87f6e6871169 100644 --- a/vcl/source/gdi/metric.cxx +++ b/vcl/source/gdi/metric.cxx @@ -2,9 +2,9 @@ * * $RCSfile: metric.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: rt $ $Date: 2004-07-13 09:29:57 $ + * last change: $Author: hdu $ $Date: 2004-07-20 09:48:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -290,9 +290,10 @@ ImplFontCharMap::~ImplFontCharMap() ImplFontCharMap* ImplFontCharMap::GetDefaultMap() { - if( !pDefaultImplFontCharMap ) + if( pDefaultImplFontCharMap ) + pDefaultImplFontCharMap->AddReference(); + else pDefaultImplFontCharMap = new ImplFontCharMap( 2, pDefaultRangeCodes ); - pDefaultImplFontCharMap->AddReference(); return pDefaultImplFontCharMap; } @@ -481,6 +482,7 @@ FontCharMap::FontCharMap() FontCharMap::~FontCharMap() { mpImpl->DeReference(); + mpImpl = NULL; } // ----------------------------------------------------------------------- |