mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 03:18:49 +03:00
Fix iterator crash
This commit is contained in:
parent
e37c2e34ce
commit
fc890f572c
1 changed files with 4 additions and 5 deletions
|
@ -516,11 +516,10 @@ MatrixClient::getOwnCommunities() noexcept
|
|||
|
||||
try {
|
||||
QList<QString> response;
|
||||
for (auto it = json["groups"].toArray().constBegin();
|
||||
it != json["groups"].toArray().constEnd();
|
||||
it++) {
|
||||
response.append(it->toString());
|
||||
}
|
||||
|
||||
for (auto group : json["groups"].toArray())
|
||||
response.append(group.toString());
|
||||
|
||||
emit getOwnCommunitiesResponse(response);
|
||||
} catch (DeserializationException &e) {
|
||||
qWarning() << "Own communities:" << e.what();
|
||||
|
|
Loading…
Reference in a new issue