[Browser] Crash fix (#168)

* [Browser] Crash Fix

* Update NetController.cpp
pull/170/head
Battlerax 8 years ago committed by David Cernat
parent 3adbf17545
commit 186e3c2337

@ -85,7 +85,12 @@ void NetController::setData(QString address, QJsonObject server, ServerModel *mo
model->setData(mi, server["passw"].toBool());
mi = model->index(0, ServerData::PING);
// This *should* fix a crash when a port isn't returned by data.
if(!address.contains(":"))
{
address.append(":25565");
}
QStringList addr = address.split(":");
model->setData(mi, PingRakNetServer(addr[0].toLatin1().data(), addr[1].toUShort()));
}

Loading…
Cancel
Save