Prevent crash when sending empty ASS packet

This commit is contained in:
Salanto 2021-05-12 01:56:15 +02:00
parent 8a9bb6dc69
commit 8fc75f29a7

View File

@ -705,7 +705,7 @@ void AOApplication::server_packet_received(AOPacket *p_packet)
//AssetURL Packet
else if (header == "ASS") {
if (f_contents.size() > 1) { // This can never be more than one link.
if (f_contents.size() > 1 || f_contents.size() == 0) { // This can never be more than one link.
goto end;
}
QUrl t_asset_url = QUrl::fromPercentEncoding(f_contents.at(0).toUtf8());