diff --git a/Servers/ProtocolServer/PSClientConnection.cpp b/Servers/ProtocolServer/PSClientConnection.cpp index b8be911f84..bf7289f1bf 100644 --- a/Servers/ProtocolServer/PSClientConnection.cpp +++ b/Servers/ProtocolServer/PSClientConnection.cpp @@ -79,7 +79,7 @@ OwnPtr PSClientConnection::handl void PSClientConnection::did_finish_download(Badge, Download& download, bool success) { RefPtr buffer; - if (success && !download.payload().is_null()) { + if (success && download.payload().size() > 0 && !download.payload().is_null()) { buffer = SharedBuffer::create_with_size(download.payload().size()); memcpy(buffer->data(), download.payload().data(), download.payload().size()); buffer->seal();