diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-26 11:21:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-26 15:51:55 +0100 |
commit | 4dbb91ce732a51b8f388e12038ecf43b1b5d98da (patch) | |
tree | 0288b9596c7a5082c0e6f2d13c55d53e19abbe88 /svx | |
parent | 91e8185802741eb386b93cfc7fcce773951881b4 (diff) |
coverity#1215317 Uncaught exception
Change-Id: Idada0fbd80f55f67bd62cb7d31dcc7457e4a18d5
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 09b1ded2c294..0ab6c0200a91 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -596,7 +596,7 @@ bool Gallery::RemoveTheme( const OUString& rThemeName ) return bRet; } -GalleryTheme* Gallery::ImplGetCachedTheme( const GalleryThemeEntry* pThemeEntry ) +GalleryTheme* Gallery::ImplGetCachedTheme(const GalleryThemeEntry* pThemeEntry) { GalleryTheme* pTheme = NULL; @@ -623,12 +623,18 @@ GalleryTheme* Gallery::ImplGetCachedTheme( const GalleryThemeEntry* pThemeEntry if( pIStm ) { - pTheme = new GalleryTheme( this, (GalleryThemeEntry*) pThemeEntry ); - ReadGalleryTheme( *pIStm, *pTheme ); + try + { + pTheme = new GalleryTheme( this, (GalleryThemeEntry*) pThemeEntry ); + ReadGalleryTheme( *pIStm, *pTheme ); - if( pIStm->GetError() ) + if( pIStm->GetError() ) + { + delete pTheme, pTheme = NULL; + } + } + catch (const css::ucb::ContentCreationException&) { - delete pTheme, pTheme = NULL; } delete pIStm; |