diff options
Diffstat (limited to 'protocols/Tox/src/tox_core.cpp')
-rw-r--r-- | protocols/Tox/src/tox_core.cpp | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/protocols/Tox/src/tox_core.cpp b/protocols/Tox/src/tox_core.cpp index 5ab131ea6e..f37ec8d866 100644 --- a/protocols/Tox/src/tox_core.cpp +++ b/protocols/Tox/src/tox_core.cpp @@ -37,7 +37,7 @@ Tox_Options* CToxProto::GetToxOptions() }
}
}
-
+
return options;
}
@@ -118,22 +118,18 @@ bool CToxProto::InitToxCore(CToxThread *toxThread) void CToxProto::UninitToxCore(CToxThread *toxThread)
{
- if (toxThread) {
- if (toxThread->toxAV)
- toxav_kill(toxThread->toxAV);
+ if (toxThread == NULL)
+ return;
- if (toxThread->tox)
- {
- CancelAllTransfers();
+ if (toxThread->toxAV)
+ toxav_kill(toxThread->toxAV);
- SaveToxProfile(toxThread);
+ if (toxThread->tox == NULL)
+ return;
+
+ CancelAllTransfers();
+ SaveToxProfile(toxThread);
- if (toxThread->tox != NULL)
- {
- tox_kill(toxThread->tox);
- toxThread->tox = NULL;
- }
- }
- toxThread = NULL;
- }
+ tox_kill(toxThread->tox);
+ toxThread->tox = NULL;
}
\ No newline at end of file |