diff options
-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); } |