summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-12-13 14:36:24 +0000
committerCaolán McNamara <caolanm@redhat.com>2010-12-13 20:35:43 +0000
commit570da8fd4a341a7e5606bb703efeac373418639e (patch)
tree5bc1ad7b23cd09bb93ae7989cb3ba47d9c2c568f
parentdbc4b25f55bc5363ca26782439215f14ff097951 (diff)
release fontconfig on exit
-rw-r--r--vcl/unx/source/fontmanager/fontconfig.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx
index 1de85367c39d..fb071bb60e89 100644
--- a/vcl/unx/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@ -99,6 +99,7 @@ class FontCfgWrapper
int m_nFcVersion;
FcBool (*m_pFcInit)();
+ void (*m_pFcFini)();
int (*m_pFcGetVersion)();
FcConfig* (*m_pFcConfigGetCurrent)();
FcObjectSet* (*m_pFcObjectSetVaBuild)(const char*,va_list);
@@ -152,6 +153,9 @@ public:
FcBool FcInit()
{ return m_pFcInit(); }
+ void FcFini()
+ { if (m_pFcFini) m_pFcFini(); }
+
int FcGetVersion()
{ return m_pFcGetVersion(); }
@@ -286,6 +290,8 @@ FontCfgWrapper::FontCfgWrapper()
m_pFcInit = (FcBool(*)())
loadSymbol( "FcInit" );
+ m_pFcFini = (void(*)())
+ loadSymbol( "FcFini" );
m_pFcGetVersion = (int(*)())
loadSymbol( "FcGetVersion" );
m_pFcConfigGetCurrent = (FcConfig *(*)())
@@ -465,6 +471,7 @@ FontCfgWrapper::~FontCfgWrapper()
{
if( m_pOutlineSet )
FcFontSetDestroy( m_pOutlineSet );
+ FcFini();
if( m_pLib )
osl_unloadModule( (oslModule)m_pLib );
}