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, [=]() {
|
QObject::connect(coreThread, &QThread::started, core, [=]() {
|
||||||
core->start(toxsave);
|
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();
|
const ToxPk selfPk = core->getSelfPublicKey();
|
||||||
QByteArray data = loadAvatarData(selfPk);
|
QByteArray data = loadAvatarData(selfPk);
|
||||||
if (data.isEmpty()) {
|
if (data.isEmpty()) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user