blob: e7892be1aaef985acc4a81900f8d2c3e6de30d86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
--- misc/libwpd-0.9.4/src/lib/WPXBinaryData.cpp 2011-10-28 15:37:48.000000000 +0200
+++ misc/build/libwpd-0.9.4/src/lib/WPXBinaryData.cpp 2012-06-09 00:02:43.293981048 +0200
@@ -174,7 +174,14 @@
const WPXInputStream *WPXBinaryData::getDataStream() const
{
if (m_binaryDataImpl->m_stream)
+ {
delete (m_binaryDataImpl->m_stream);
- return ((m_binaryDataImpl->m_stream) = new WPXMemoryInputStream(&(m_binaryDataImpl->m_buf[0]), m_binaryDataImpl->m_buf.size()));
+ m_binaryDataImpl->m_stream = 0;
+ }
+ if (m_binaryDataImpl->m_buf.empty())
+ return 0;
+ m_binaryDataImpl->m_stream = new WPXMemoryInputStream(&(m_binaryDataImpl->m_buf[0]), m_binaryDataImpl->m_buf.size());
+ return m_binaryDataImpl->m_stream;
}
+
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
|