summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-01 15:09:23 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-01 16:43:05 +0100
commitb35f3dfb1afa78722a4cd8e69a625456a6dd01d6 (patch)
tree4549eb1ba73348f99a31f37c7a00d48a1df980f3 /basic
parent7dda48d56f2d10bd6220fba19168ee1a70ecc05f (diff)
coverity#706240 Uncaught exception
Change-Id: Ie31f5e1ff74ff8b9f35d7ce08e1f02a780375890
Diffstat (limited to 'basic')
-rw-r--r--basic/source/uno/namecont.cxx28
1 files changed, 17 insertions, 11 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 71af61e43a24..de2b91a6b356 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -496,21 +496,27 @@ sal_Bool SfxLibraryContainer::isModified()
for( sal_Int32 i = 0 ; i < nNameCount ; i++ )
{
OUString aName = pNames[ i ];
- SfxLibrary* pImplLib = getImplLib( aName );
- if( pImplLib->isModified() )
+ try
{
- if ( aName == "Standard" )
+ SfxLibrary* pImplLib = getImplLib( aName );
+ if( pImplLib->isModified() )
{
- // this is a workaround that has to be implemented because
- // empty standard library should stay marked as modified
- // but should not be treated as modified while it is empty
- if ( pImplLib->hasElements() )
+ if ( aName == "Standard" )
+ {
+ // this is a workaround that has to be implemented because
+ // empty standard library should stay marked as modified
+ // but should not be treated as modified while it is empty
+ if ( pImplLib->hasElements() )
+ return sal_True;
+ }
+ else
+ {
return sal_True;
+ }
}
- else
- {
- return sal_True;
- }
+ }
+ catch(const css::container::NoSuchElementException&)
+ {
}
}