1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
tux3 2015-09-27 23:45:02 +02:00
parent 865b1a915c
commit c0e2b91fe8
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -764,6 +764,8 @@ void Core::removeGroup(int groupId, bool fake)
QString Core::getUsername() const QString Core::getUsername() const
{ {
QString sname; QString sname;
if (!tox)
return sname;
int size = tox_self_get_name_size(tox); int size = tox_self_get_name_size(tox);
uint8_t* name = new uint8_t[size]; uint8_t* name = new uint8_t[size];
tox_self_get_name(tox, name); tox_self_get_name(tox, name);
@ -830,6 +832,8 @@ QPair<QByteArray, QByteArray> Core::getKeypair() const
QString Core::getStatusMessage() const QString Core::getStatusMessage() const
{ {
QString sname; QString sname;
if (!tox)
return sname;
size_t size = tox_self_get_status_message_size(tox); size_t size = tox_self_get_status_message_size(tox);
uint8_t* name = new uint8_t[size]; uint8_t* name = new uint8_t[size];
tox_self_get_status_message(tox, name); tox_self_get_status_message(tox, name);