diff options
author | Remko Tronçon <git@el-tramo.be> | 2013-10-01 18:38:18 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-10-01 18:38:18 (GMT) |
commit | e3b455b57c9550128018bf9c22c27c1e6ed1f81f (patch) | |
tree | 8c03f8df473d88cbc50955194d3fa1e84d5b818b /Swiften | |
parent | fd47dd7d5cec5155b9985959d2f0e0f3b386cd98 (diff) | |
download | swift-e3b455b57c9550128018bf9c22c27c1e6ed1f81f.zip swift-e3b455b57c9550128018bf9c22c27c1e6ed1f81f.tar.bz2 |
Fix bug on writing empty bytearray in file bytestream.
Change-Id: I55e79045d55c206d705609266262d734c4ed2853
Diffstat (limited to 'Swiften')
-rw-r--r-- | Swiften/FileTransfer/FileWriteBytestream.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Swiften/FileTransfer/FileWriteBytestream.cpp b/Swiften/FileTransfer/FileWriteBytestream.cpp index 5725e18..6c11eb0 100644 --- a/Swiften/FileTransfer/FileWriteBytestream.cpp +++ b/Swiften/FileTransfer/FileWriteBytestream.cpp @@ -23,6 +23,9 @@ FileWriteBytestream::~FileWriteBytestream() { } void FileWriteBytestream::write(const std::vector<unsigned char>& data) { + if (data.empty()) { + return; + } if (!stream) { stream = new boost::filesystem::ofstream(file, std::ios_base::out|std::ios_base::binary); } |