diff options
author | Thorsten Behrens <thb@openoffice.org> | 2001-04-26 16:14:55 +0000 |
---|---|---|
committer | Thorsten Behrens <thb@openoffice.org> | 2001-04-26 16:14:55 +0000 |
commit | 52487d23bc9e52da558c499930190d396bba9919 (patch) | |
tree | 490c0ce4b7a5092089fa9c7b837620a18803e967 | |
parent | fc2fd0ec1cd6246634124944113ba9e1beaa9de5 (diff) |
Error handling in OpenSotStorage adapted
-rw-r--r-- | sot/source/sdstor/storage.cxx | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 81b253cace5a..1de1838b13a2 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: storage.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: mba $ $Date: 2001-03-30 15:48:05 $ + * last change: $Author: thb $ $Date: 2001-04-26 17:14:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -953,13 +953,19 @@ SotStorage * SotStorage::OpenSotStorage( const String & rEleName, ErrCode nE = pOwnStg->GetError(); BaseStorage * p = pOwnStg->OpenStorage( rEleName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE ); - pStor = new SotStorage( p ); - if( !nE ) - pOwnStg->ResetError(); // kein Fehler setzen + if( p ) + { + pStor = new SotStorage( p ); + if( !nE ) + pOwnStg->ResetError(); // kein Fehler setzen + + return pStor; + } } - else - SetError( SVSTREAM_GENERALERROR ); - return pStor; + + SetError( SVSTREAM_GENERALERROR ); + + return NULL; } SotStorage * SotStorage::OpenUCBStorage( const String & rEleName, |