mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
[Browser] Crash fix (#168)
* [Browser] Crash Fix * Update NetController.cpp
This commit is contained in:
parent
3adbf17545
commit
186e3c2337
1 changed files with 6 additions and 1 deletions
|
@ -86,6 +86,11 @@ void NetController::setData(QString address, QJsonObject server, ServerModel *mo
|
||||||
|
|
||||||
mi = model->index(0, ServerData::PING);
|
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(":");
|
QStringList addr = address.split(":");
|
||||||
model->setData(mi, PingRakNetServer(addr[0].toLatin1().data(), addr[1].toUShort()));
|
model->setData(mi, PingRakNetServer(addr[0].toLatin1().data(), addr[1].toUShort()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue