diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-09-27 09:37:22 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-09-27 09:37:22 +0000 |
commit | dc7d14e9bec31f5ba10198e024fafe8636d1f852 (patch) | |
tree | 19ccb12879d3e582208ee46d64a82c185f8c4104 /protocols/Tox/src/tox_core.cpp | |
parent | 46c6d49ead2bff34b2f03a1d186b6d5a9786a8cd (diff) |
Tox:
- crash fix (fixes #1056)
git-svn-id: http://svn.miranda-ng.org/main/trunk@15457 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_core.cpp')
-rw-r--r-- | protocols/Tox/src/tox_core.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/protocols/Tox/src/tox_core.cpp b/protocols/Tox/src/tox_core.cpp index 25e35c84dd..335743303b 100644 --- a/protocols/Tox/src/tox_core.cpp +++ b/protocols/Tox/src/tox_core.cpp @@ -119,17 +119,18 @@ bool CToxProto::InitToxCore() void CToxProto::UninitToxCore()
{
- if (toxThread->toxAv)
- toxav_kill(toxThread->toxAv);
+ if (toxThread) {
+ if (toxThread->toxAv)
+ toxav_kill(toxThread->toxAv);
- if (toxThread->tox)
- {
- CancelAllTransfers();
+ if (toxThread->tox)
+ {
+ CancelAllTransfers();
- SaveToxProfile();
+ SaveToxProfile();
- tox_kill(toxThread->tox);
+ tox_kill(toxThread->tox);
+ }
+ toxThread = NULL;
}
-
- toxThread = NULL;
}
\ No newline at end of file |