mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix not setting tox null after cleanup
also reordered functions for super extra safety
This commit is contained in:
parent
7a59e7b853
commit
1d24eb14b4
11
src/core.cpp
11
src/core.cpp
|
@ -90,9 +90,15 @@ Core::Core(Camera* cam, QThread *CoreThread, QString loadPath) :
|
||||||
|
|
||||||
Core::~Core()
|
Core::~Core()
|
||||||
{
|
{
|
||||||
if (tox) {
|
clearPassword(Core::ptMain);
|
||||||
|
clearPassword(Core::ptHistory);
|
||||||
|
|
||||||
|
if (tox)
|
||||||
|
{
|
||||||
toxav_kill(toxav);
|
toxav_kill(toxav);
|
||||||
|
toxav = nullptr;
|
||||||
tox_kill(tox);
|
tox_kill(tox);
|
||||||
|
tox = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (videobuf)
|
if (videobuf)
|
||||||
|
@ -103,9 +109,6 @@ Core::~Core()
|
||||||
|
|
||||||
Audio::closeInput();
|
Audio::closeInput();
|
||||||
Audio::closeOutput();
|
Audio::closeOutput();
|
||||||
|
|
||||||
clearPassword(Core::ptMain);
|
|
||||||
clearPassword(Core::ptHistory);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Core* Core::getInstance()
|
Core* Core::getInstance()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user