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:
parent
254b861ded
commit
dfd5232e2f
@ -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…
x
Reference in New Issue
Block a user