mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
ShareDialog: Don't crash with bad response. #2811
This commit is contained in:
parent
9aeda891c3
commit
91ae912373
@ -229,7 +229,7 @@ void ShareDialog::slotSharesFetched(const QString &reply)
|
||||
|
||||
bool success = false;
|
||||
QVariantMap json = QtJson::parse(reply, success).toMap();
|
||||
ShareDialog::_shares = json.value("ocs").toMap().values("data")[0].toList();
|
||||
ShareDialog::_shares = json.value("ocs").toMap().value("data").toList();
|
||||
Q_FOREACH(auto share, ShareDialog::_shares)
|
||||
{
|
||||
QVariantMap data = share.toMap();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user