\r
// receive the file\r
data.resize(datalength);\r
- m_fcp->ReceiveRaw(&data[0],datalength);\r
+ if(data.size()>0)\r
+ {\r
+ m_fcp->ReceiveRaw(&data[0],datalength);\r
+ }\r
\r
// mark this index as received\r
st=m_db->Prepare("UPDATE tblMessageRequests SET Found='true' WHERE IdentityID=? AND Day=? AND RequestIndex=?;");\r
st.Finalize();\r
\r
// parse file into xml and update the database\r
- if(xml.ParseXML(std::string(data.begin(),data.end()))==true)\r
+ if(data.size()>0 && xml.ParseXML(std::string(data.begin(),data.end()))==true)\r
{\r
std::vector<std::string> boards=xml.GetBoards();\r
std::map<long,std::string> replyto=xml.GetInReplyTo();\r