Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(settings): prevent segfault on wrong proxy settings
Browse files Browse the repository at this point in the history
  • Loading branch information
sudden6 committed Jun 23, 2018
1 parent 254b861 commit dfd5232
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/persistence/profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit dfd5232

Please sign in to comment.