From e3b455b57c9550128018bf9c22c27c1e6ed1f81f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Tue, 1 Oct 2013 20:38:18 +0200
Subject: Fix bug on writing empty bytearray in file bytestream.

Change-Id: I55e79045d55c206d705609266262d734c4ed2853

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);
 	}
-- 
cgit v0.10.2-6-g49f6