diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-11-01 16:18:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-01 21:02:11 +0000 |
commit | b59196e1d7843367a80fb67288949eb4a6c4c463 (patch) | |
tree | 4c500e41da3a46ecf0063a73f2923d7bd69e3fc2 /sot/source | |
parent | 0f6e4e7fd95e23927d4aac45153a15872b32f5fd (diff) |
coverity#1247614 Unchecked return value
Change-Id: I658a7f6c8410cfa38512bb45651e5332fbde3194
Diffstat (limited to 'sot/source')
-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 |