diff options
author | David Tardon <dtardon@redhat.com> | 2014-01-27 15:41:07 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-01-27 15:43:49 +0100 |
commit | eb70c0993daf02513182b5d9a53d552622a8a6f1 (patch) | |
tree | 246292680d739407b64df4865db98cd44b13e7e7 | |
parent | c1b7a2feb435d8e738e0636d58f027c5db4e8201 (diff) |
fdo#73979 return 0 for unknown substreams
Change-Id: I8959891fc90544e2812651c0a2041f2760d90a83
-rw-r--r-- | writerperfect/source/common/WPXSvStream.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/writerperfect/source/common/WPXSvStream.cxx b/writerperfect/source/common/WPXSvStream.cxx index 6bb14d289151..73f677410a09 100644 --- a/writerperfect/source/common/WPXSvStream.cxx +++ b/writerperfect/source/common/WPXSvStream.cxx @@ -714,11 +714,12 @@ void WPXSvInputStreamImpl::invalidateReadBuffer() WPXInputStream *WPXSvInputStreamImpl::createWPXStream(const SotStorageStreamRef &rxStorage) { - Reference < XInputStream > xContents(new utl::OSeekableInputStreamWrapper( rxStorage )); - if (xContents.is()) + if (rxStorage.Is()) + { + Reference < XInputStream > xContents(new utl::OSeekableInputStreamWrapper( rxStorage )); return new WPXSvInputStream( xContents ); - else - return 0; + } + return 0; } WPXInputStream *WPXSvInputStreamImpl::createWPXStream(const Reference<XInputStream> &rxStream) |