diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-10-19 11:26:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-10-19 11:57:10 +0100 |
commit | e3c52ca8d0816ddff87cd9113c8cfe1b0f8bb645 (patch) | |
tree | 64a53a92ee65cbe9f6014127642d9490042f7416 /unotools | |
parent | cdb4aae582fd0bd553f2b328f1601caa990e5b58 (diff) |
survive missing configuration entries for paths
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/pathoptions.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx index bb19b2c032d3..5ce92c5d6fee 100644 --- a/unotools/source/config/pathoptions.cxx +++ b/unotools/source/config/pathoptions.cxx @@ -263,9 +263,12 @@ static VarNameAttribute aVarNameAttribute[] = const String& SvtPathOptions_Impl::GetPath( SvtPathOptions::Pathes ePath ) { + if ( ePath >= SvtPathOptions::PATH_COUNT ) + return m_aEmptyString; + ::osl::MutexGuard aGuard( m_aMutex ); - if ( ePath < SvtPathOptions::PATH_COUNT ) + try { OUString aPathValue; String aResult; @@ -290,6 +293,9 @@ const String& SvtPathOptions_Impl::GetPath( SvtPathOptions::Pathes ePath ) m_aPathArray[ ePath ] = aPathValue; return m_aPathArray[ ePath ]; } + catch (UnknownPropertyException &) + { + } return m_aEmptyString; } |