1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(settings): prevent segfault on wrong proxy settings

This commit is contained in:
sudden6 2018-06-23 14:07:40 +02:00
parent 254b861ded
commit dfd5232e2f
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -70,6 +70,12 @@ Profile::Profile(QString name, const QString& password, bool isNewProfile, const
QObject::connect(coreThread, &QThread::started, core, [=]() {
core->start(toxsave);
// prevent segfault by checking if core started successfully
if(!core->isReady()) {
qWarning() << "Core not ready, aborting";
return;
}
const ToxPk selfPk = core->getSelfPublicKey();
QByteArray data = loadAvatarData(selfPk);
if (data.isEmpty()) {