diff options
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index b5c12cdc3c44..6f66c25b7621 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -2835,7 +2835,12 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const OUString& rEleName, StreamMode } pElement->m_xStream->PrepareCachedForReopen( nMode ); - pElement->m_xStream->Init(); + bool bInited = pElement->m_xStream->Init(); + if (!bInited) + { + SetError( ( nMode & STREAM_WRITE ) ? SVSTREAM_CANNOT_MAKE : SVSTREAM_FILE_NOT_FOUND ); + return NULL; + } pElement->m_bIsStorage = true; return pElement->m_xStream->CreateStorage(); // can only be created in transacted mode |