diff options
-rw-r--r-- | protocols/Tox/src/tox_profile.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp index 1ad015dee3..88248f7c27 100644 --- a/protocols/Tox/src/tox_profile.cpp +++ b/protocols/Tox/src/tox_profile.cpp @@ -12,6 +12,11 @@ std::tstring CToxProto::GetToxProfilePath() void CToxProto::LoadToxProfile()
{
+ if (tox == NULL)
+ {
+ return;
+ }
+
std::tstring toxProfilePath = GetToxProfilePath();
FILE *hFile = _wfopen(toxProfilePath.c_str(), _T("rb"));
if (!hFile)
@@ -63,6 +68,11 @@ void CToxProto::LoadToxProfile() void CToxProto::SaveToxProfile()
{
+ if (tox == NULL)
+ {
+ return;
+ }
+
std::tstring toxProfilePath = GetToxProfilePath();
FILE *hFile = _wfopen(toxProfilePath.c_str(), _T("wb"));
if (!hFile)
|