summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_options.cpp')
-rw-r--r--protocols/Tox/src/tox_options.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp
index 0b24416308..934f0b9ba1 100644
--- a/protocols/Tox/src/tox_options.cpp
+++ b/protocols/Tox/src/tox_options.cpp
@@ -18,8 +18,11 @@ INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
ptrT pass(proto->getTStringA("Password"));
SetDlgItemText(hwnd, IDC_PASSWORD, pass);
- std::string address = proto->getStringA(NULL, TOX_SETTINGS_ID);
- SetDlgItemTextA(hwnd, IDC_TOXID, address.c_str());
+ ptrA address(proto->getStringA(TOX_SETTINGS_ID));
+ if (address != NULL)
+ {
+ SetDlgItemTextA(hwnd, IDC_TOXID, address);
+ }
ptrT group(proto->getTStringA(TOX_SETTINGS_GROUP));
SetDlgItemText(hwnd, IDC_GROUP, group);
@@ -93,7 +96,7 @@ INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
proto->delSetting(NULL, TOX_SETTINGS_GROUP);
}
- proto->SaveToxData();
+ proto->SaveToxProfile();
return TRUE;
}