fix possible crash in archlinux

This commit is contained in:
xiaoyifang 2022-10-26 16:17:28 +08:00
parent 6d8779442c
commit 9719091776

View file

@ -2759,7 +2759,7 @@ void ResourceToSaveHandler::downloadFinished()
{ {
if ( (*i)->isFinished() ) if ( (*i)->isFinished() )
{ {
if ( (*i)->dataSize() >= 0 && !alreadyDone ) if ( (*i)->dataSize() > 0 && !alreadyDone )
{ {
QByteArray resourceData; QByteArray resourceData;
vector< char > const & data = (*i)->getFullData(); vector< char > const & data = (*i)->getFullData();