From 76e866c5c96e40d66f870d536839fe2fc3e7468e Mon Sep 17 00:00:00 2001 From: Battlerax Date: Thu, 23 Feb 2017 23:30:29 -0600 Subject: [PATCH] [Browser] Crash Fix --- apps/browser/NetController.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/apps/browser/NetController.cpp b/apps/browser/NetController.cpp index b27742ae1..e97463c59 100644 --- a/apps/browser/NetController.cpp +++ b/apps/browser/NetController.cpp @@ -85,14 +85,13 @@ 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())); + // 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())); } bool NetController::downloadInfo(QAbstractItemModel *pModel, QModelIndex index)