[Libreoffice-commits] core.git: writerperfect/source

David Tardon dtardon at redhat.com
Mon Jan 27 06:45:25 PST 2014


 writerperfect/source/common/WPXSvStream.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit eb70c0993daf02513182b5d9a53d552622a8a6f1
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Jan 27 15:41:07 2014 +0100

    fdo#73979 return 0 for unknown substreams
    
    Change-Id: I8959891fc90544e2812651c0a2041f2760d90a83

diff --git a/writerperfect/source/common/WPXSvStream.cxx b/writerperfect/source/common/WPXSvStream.cxx
index 6bb14d2..73f6774 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)


More information about the Libreoffice-commits mailing list