Fix iterator crash

This commit is contained in:
Konstantinos Sideris 2018-01-21 18:25:58 +02:00
parent e37c2e34ce
commit fc890f572c

View file

@ -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();