Browse Source

fix(settings): prevent segfault on wrong proxy settings

reviewable/pr5185/r1
sudden6 8 years ago
parent
commit
dfd5232e2f
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
  1. 6
      src/persistence/profile.cpp

6
src/persistence/profile.cpp

@ -70,6 +70,12 @@ Profile::Profile(QString name, const QString& password, bool isNewProfile, const @@ -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()) {

Loading…
Cancel
Save