mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-02 12:06:41 +00:00
[Browser] Crash Fix
This commit is contained in:
parent
ff0d21ef38
commit
76e866c5c9
1 changed files with 7 additions and 8 deletions
|
@ -85,14 +85,13 @@ void NetController::setData(QString address, QJsonObject server, ServerModel *mo
|
||||||
model->setData(mi, server["passw"].toBool());
|
model->setData(mi, server["passw"].toBool());
|
||||||
|
|
||||||
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.
|
||||||
// This *should* fix a crash when a port isn't returned by data.
|
if(!address.contains(":"))
|
||||||
if(!address.contains(":"))
|
{
|
||||||
{
|
address.append(":25565");
|
||||||
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()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NetController::downloadInfo(QAbstractItemModel *pModel, QModelIndex index)
|
bool NetController::downloadInfo(QAbstractItemModel *pModel, QModelIndex index)
|
||||||
|
|
Loading…
Reference in a new issue